From 4949e746c35fc46bea7efdd9f683fe2b5ce10e41 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Aug 09 2018 12:29:41 +0000 Subject: This has now been merged into the fedora src rpm package Signed-off-by: Peter Robinson --- diff --git a/80-server.preset b/80-server.preset deleted file mode 100644 index 4387548..0000000 --- a/80-server.preset +++ /dev/null @@ -1,6 +0,0 @@ -# -# Fedora Server -# - -# The Cockpit web-based system management console -enable cockpit.socket diff --git a/80-workstation.preset b/80-workstation.preset deleted file mode 100644 index 7e250fb..0000000 --- a/80-workstation.preset +++ /dev/null @@ -1,15 +0,0 @@ -# -# Fedora Workstation -# - -# disable sshd socket by default on workstation -disable sshd.socket - -# disable sshd service by default on workstation -disable sshd.service - -# enable cups on-demand socket activation by default on workstation -# https://pagure.io/fedora-workstation/issue/8 -enable cups.socket -enable cups.path -disable cups.service diff --git a/85-display-manager.preset b/85-display-manager.preset deleted file mode 100644 index 08d5060..0000000 --- a/85-display-manager.preset +++ /dev/null @@ -1,11 +0,0 @@ -# We enable all display managers by default. Since only one can -# actually be enabled at the same time the one which is installed -# first wins - -enable gdm.service -enable lightdm.service -enable slim.service -enable lxdm.service -enable sddm.service -enable kdm.service -enable xdm.service diff --git a/90-default-user.preset b/90-default-user.preset deleted file mode 100644 index 690831d..0000000 --- a/90-default-user.preset +++ /dev/null @@ -1,4 +0,0 @@ -# This enables the pipewire service to be socket-activated for -# individual user sessions. -# https://bugzilla.redhat.com/show_bug.cgi?id=1592434 -enable pipewire.socket diff --git a/90-default.preset b/90-default.preset deleted file mode 100644 index 710832e..0000000 --- a/90-default.preset +++ /dev/null @@ -1,261 +0,0 @@ -# Also see: -# https://fedoraproject.org/wiki/Starting_services_by_default - -# On Fedora we deviate from some upstream defaults -disable systemd-timesyncd.service -disable systemd-networkd.service -disable systemd-networkd-wait-online.service -disable systemd-resolved.service - -# These presets were last validated en-masse on 2015-09-09 -# https://fedorahosted.org/fesco/ticket/1472 - -# System stuff -# https://fedoraproject.org/w/index.php?title=Starting_services_by_default&oldid=377748 -enable sshd.service - -# Locally-running services -enable atd.* -enable crond.* - -# Approved by FESCo - https://fedorahosted.org/fesco/ticket/636 -enable chronyd.service - -# https://fedoraproject.org/w/index.php?title=Starting_services_by_default&oldid=377748 -# https://bugzilla.redhat.com/show_bug.cgi?id=1455704 -enable NetworkManager.service -enable NetworkManager-wait-online.service -enable NetworkManager-dispatcher.service -enable ModemManager.service - -# Approved by FESCo - https://fedorahosted.org/fesco/ticket/1311 -enable auditd.service - -# Locally-running service -enable restorecond.service - -# Approved by FESCo - https://fedorahosted.org/fesco/ticket/1166 -enable bluetooth.* - -# https://fedoraproject.org/w/index.php?title=Starting_services_by_default&oldid=377748 -enable avahi-daemon.* - -# Default configuration is locally-running only -# CUPS is now socket-activatable for local use-cases, so don't enable cups.service -# https://pagure.io/fesco/issue/1701 -enable cups.socket -enable cups.path - -# The various syslog implementations -enable rsyslog.* -enable syslog-ng.* -enable sysklogd.* - -# Network facing -# https://fedoraproject.org/w/index.php?title=Starting_services_by_default&oldid=377748 -enable firewalld.service - -# Approved by FESCo - https://fedorahosted.org/fesco/ticket/544 -enable libvirtd.service - -# https://fedoraproject.org/w/index.php?title=Starting_services_by_default&oldid=377748 -enable xinetd.service - -# Storage -# Approved by FESCo - https://fedorahosted.org/fesco/ticket/391 -enable multipathd.service - -# Approved by FESCo - https://fedorahosted.org/fesco/ticket/876 -enable libstoragemgmt.service - -# Locally-running services -enable lvm2-monitor.* -enable lvm2-lvmetad.* -enable dm-event.* -enable dmraid-activation.service - -# https://bugzilla.redhat.com/show_bug.cgi?id=855372 -enable mdmonitor.service -enable mdmonitor-takeover.service - -# https://bugzilla.redhat.com/show_bug.cgi?id=876237 -enable spice-vdagentd.service - -# https://bugzilla.redhat.com/show_bug.cgi?id=885406 -enable qemu-guest-agent.service - -# https://bugzilla.redhat.com/show_bug.cgi?id=928726 -enable dnf-makecache.timer - -# https://bugzilla.redhat.com/show_bug.cgi?id=957135 -enable vmtoolsd.service - -# https://bugzilla.redhat.com/show_bug.cgi?id=976315 -enable dkms.service - -# https://bugzilla.redhat.com/show_bug.cgi?id=961878 -enable ipmi.service -enable ipmievd.service - -# https://bugzilla.redhat.com/show_bug.cgi?id=1039351 -enable x509watch.timer - -# https://bugzilla.redhat.com/show_bug.cgi?id=1060754 -enable dnssec-triggerd.service - -# https://bugzilla.redhat.com/show_bug.cgi?id=1095353 -enable uuidd.socket - -# Hardware -# Locally-running service -enable gpm.* - -# https://bugzilla.redhat.com/show_bug.cgi?id=1066421 -enable gpsd.socket - -# https://bugzilla.redhat.com/show_bug.cgi?id=1141607 -enable x2gocleansessions.service - -# https://bugzilla.redhat.com/show_bug.cgi?id=1215641 -enable unbound-anchor.timer - -# https://bugzilla.redhat.com/show_bug.cgi?id=1222495 -enable lvm2-lvmpolld.* - -# https://fedoraproject.org/wiki/Changes/UEFISecureBootBlacklistUpdates -enable dbxtool.service - -# Locally-running services -enable irqbalance.service -enable lm_sensors.service -enable mcelog.* -enable smartd.service -enable pcscd.socket -enable rngd.service - -# Other stuff -# Approved by FESCo - https://fedorahosted.org/fesco/ticket/937 -# Note: abrt-ccpp.service is excluded in favor of systemd-coredump. -enable abrtd.service -enable abrt-journal-core.service -enable abrt-oops.service -enable abrt-xorg.service -enable abrt-vmcore.service - -# Locally-running services -enable ksm.service -enable ksmtuned.service -enable rootfs-resize.service -enable sysstat.service -enable sysstat-collect.timer -enable sysstat-summary.timer -enable uuidd.service -enable xendomains.service -enable xenstored.service -enable xenconsoled.service - -# Desktop stuff -# Locally-running services -enable accounts-daemon.service -enable rtkit-daemon.service -enable upower.service -enable udisks2.service -enable polkit.service - -# https://bugzilla.redhat.com/show_bug.cgi?id=1187072 -enable timedatex.service - -# https://bugzilla.redhat.com/show_bug.cgi?id=1231745 -enable mlocate-updatedb.timer - -# https://bugzilla.redhat.com/show_bug.cgi?id=1218999 -enable sa-update.timer - -# Hyper-V guest support daemons -# https://bugzilla.redhat.com/show_bug.cgi?id=1279322 -enable vmtoolsd.service - -# mcelog is a utility that collects and decodes Machine Check Exception data -# on x86-32 and x86-64 systems. -# https://bugzilla.redhat.com/show_bug.cgi?id=1302179 -enable mcelog.service - -# OPAL-prd is a utility specific to ppc64le systems -# It is the "OPAL Processor Recovery Diagnostics Daemon" -# https://bugzilla.redhat.com/show_bug.cgi?id=1312018 -enable opal-prd.service - -# virtlog.service is sometimes used by VMs started by libvirt.service -# Enable virtlog.socket to have it socket activated -# https://bugzilla.redhat.com/show_bug.cgi?id=1290357 -enable virtlogd.socket - -# lircd is the Linux Infrared Control daemon -# Starting with version 0.9.4, it requires no manual configuration -# https://bugzilla.redhat.com/show_bug.cgi?id=1340061 -enable lircd.socket - -# IPSec management -# https://bugzilla.redhat.com/show_bug.cgi?id=1276285 -enable pluto.socket - -# https://bugzilla.redhat.com/show_bug.cgi?id=1367932 -# Automatically refresh installed snaps -enable snapd.refresh.timer -# Socket activated daemon to manage snaps -enable snapd.socket - -# Support for dual-GPU systems -# https://bugzilla.redhat.com/show_bug.cgi?id=1389762 -enable switcheroo-control.service - -# Support for the DRBD link-cleaning service -# https://bugzilla.redhat.com/show_bug.cgi?id=1399387 -enable drbdlinksclean.service - -# Enable the System Security Services Daemon -# https://bugzilla.redhat.com/show_bug.cgi?id=1427649 -enable sssd.service - -# Enable ostree-remount on ostree-based systems -# (Does nothing on non-ostree systems) -# https://bugzilla.redhat.com/show_bug.cgi?id=1451458 -enable ostree-remount.service - -# Enable Performance Co-Pilot services -# https://bugzilla.redhat.com/show_bug.cgi?id=1472350 -enable pmcd.service -enable pmlogger.service -enable pmie.service - -# Enable SSSD Kerberos Credential Cache Server -# https://bugzilla.redhat.com/show_bug.cgi?id=1475999 -enable sssd-kcm.socket -enable sssd-secrets.socket - -# A mechanism to transfer state between the initramfs and the real -# system. Obsolete since /run was introduced, but still used by some -# services. -# https://bugzilla.redhat.com/show_bug.cgi?id=1493479 -# https://bugzilla.redhat.com/show_bug.cgi?id=1584645 -enable import-state.service - -# An initscripts mechanism for readonly root -# https://bugzilla.redhat.com/show_bug.cgi?id=1493479 -# https://bugzilla.redhat.com/show_bug.cgi?id=1584645 -enable readonly-root.service - -# Ensure that any installed kmods are built for the currently-running -# kernel at boot -# https://bugzilla.redhat.com/show_bug.cgi?id=1518258 -enable akmods.service - -# virtualbox-guest-additions service, yet another virtual-machine guest -# integration agent, this is a locally-running service, Note this has a -# "ConditionVirtualization=|oracle" so it will only run under VirtualBox -# https://bugzilla.redhat.com/show_bug.cgi?id=1534595 -enable vboxservice.service - -# Mark the system for SELinux autorelabel when appropriate -# https://bugzilla.redhat.com/show_bug.cgi?id=1589720 -enable selinux-autorelabel-mark.service diff --git a/99-default-disable.preset b/99-default-disable.preset deleted file mode 100644 index 1f29b50..0000000 --- a/99-default-disable.preset +++ /dev/null @@ -1 +0,0 @@ -disable * diff --git a/Fedora-Legal-README.txt b/Fedora-Legal-README.txt deleted file mode 100644 index 747dd6c..0000000 --- a/Fedora-Legal-README.txt +++ /dev/null @@ -1,48 +0,0 @@ -= License = - -Fedora is a compilation of software packages, each under its own -license. The compilation itself is released under the MIT license -(see the file LICENSE). However, this compilation license does not -supersede the licenses of code and content contained in Fedora, which -conform to the legal guidelines described at -https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing. - -= Source Availability = - -The accompanying Fedora @@VERSION@@ release includes copyrighted -software that is licensed under the GNU General Public License and -other licenses. You may obtain the complete machine-readable source -code corresponding to portions of this release by sending a check or -money order in the amount of US $5.00 to: - -VP, Legal - Products & Technologies | Red Hat, Inc. | 100 East Davie Street | Raleigh, NC 27601 USA - -Please write "source for Fedora @@VERSION@@" in the memo line of your payment. - -You may also access a copy of this source code at: -http://dl.fedoraproject.org/pub/fedora/linux/releases/@@VERSION@@/Everything/source/ - -This offer is valid to anyone in receipt of this information and shall -expire three years following the date of the final distribution of -this release by Red Hat, Inc. - -= Export Regulations = - -By downloading or installing Fedora software, you acknowledge that you -understand all of the following: Fedora software and technical information may -be subject to the U.S. Export Administration Regulations (the “EAR”) and other -U.S. and foreign laws and may not be exported, re-exported or transferred (a) -to any country listed in Country Group E:1 in Supplement No. 1 to part 740 of -the EAR (currently, Cuba, Iran, North Korea, Sudan & Syria); (b) to any -prohibited destination or to any end user who has been prohibited from -participating in U.S. export transactions by any federal agency of the U.S. -government; or (c) for use in connection with the design, development or -production of nuclear, chemical or biological weapons, or rocket systems, space -launch vehicles, or sounding rockets, or unmanned air vehicle systems. You may -not download Fedora software or technical information if you are located in one -of these countries or otherwise subject to these restrictions. You may not -provide Fedora software or technical information to individuals or entities -located in one of these countries or otherwise subject to these restrictions. -You are also responsible for compliance with foreign law requirements -applicable to the import, export and use of Fedora software and technical -information. diff --git a/LICENSE b/LICENSE deleted file mode 100644 index df0d7c3..0000000 --- a/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2014 Fedora Project Authors. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Makefile b/Makefile deleted file mode 100644 index 57aea12..0000000 --- a/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -VERSION=$(shell awk '/Version:/ { print $$2 }' fedora-release.spec) -RELEASE=$(shell awk '/Release:/ { print $$2 }' fedora-release.spec) -GITTAG=fedora-release-$(VERSION) - -all: - -tag-archive: - @git tag -a -m "Tag as $(GITTAG)" -f $(GITTAG) - @echo "Tagged as $(GITTAG)" - -create-archive: - @git archive --prefix $(GITTAG)/ --format tar $(GITTAG) |bzip2 > $(GITTAG).tar.bz2 - @echo "" - @echo "The final archive is in $(GITTAG).tar.bz2" - @chmod 644 $(GITTAG).tar.bz2 - -archive: tag-archive create-archive diff --git a/README b/README new file mode 100644 index 0000000..2944205 --- /dev/null +++ b/README @@ -0,0 +1 @@ +This repo is now obsolete, please submit a PR to https://src.fedoraproject.org/rpms/fedora-release/pull-request/ diff --git a/convert-to-edition b/convert-to-edition deleted file mode 100755 index 6bc9ea4..0000000 --- a/convert-to-edition +++ /dev/null @@ -1,183 +0,0 @@ -#!/bin/bash - -# Simple script to set up Edition defaults for Fedora -# Keep this in sync with convert-to-edition.lua - -OPTIND=1 - -VARIANT_FILE=/usr/lib/variant - -# Defaults are set to provide the fewest suprises for anyone running this -# script manually to convert their own system. In nearly all cases, it should -# be possible to run `convert-to-edition -e ` and get expected results - -# By default, install new packages to ensure that all the necessary files are -# available before symlinking. This must be skipped when running this file as -# part of an RPM scriptlet. -do_installation=1 - -# By default, do not modify the enabled or disabled state of any service on the -# system. This should only be done when this script is run as part of system -# installation or if the user is certain that they want to apply the changes to -# the presets to their system. -enable_presets=0 - -exit_usage() { - echo "Usage: convert-to-edition [options] -e cloud|non-edition|server|workstation" - echo " Options:" - echo " -e: The edition to install (atomichost, cloud, non-edition, server or workstation)" - echo " -i: Skip installing additional files and just update symlinks" - echo " -p: Also enable newly-added systemd presets" - exit 1 -} - -while getopts "e:ihp" opt; do - case "$opt" in - e) - EDITION=$OPTARG - ;; - i) - do_installation=0 - ;; - p) - enable_presets=1 - ;; - h) - exit_usage - ;; - esac -done - -# None of the actions below can be run by a non-root user -if [[ $EUID -ne 0 ]]; then - echo "This script must be run as root" 1>&2 - exit 1 -fi - -case $EDITION in - atomichost) - if [ $do_installation -gt 0 ]; then - dnf install -y fedora-release-atomichost - fi - - echo "VARIANT_ID=atomic.host" > $VARIANT_FILE - - # Ensure that the os-release file is pointing to the correct version - ln -sf ./os.release.d/os-release-atomichost /usr/lib/os-release || : - - # Ensure that the issue file is pointing to the correct version - ln -sf ./os.release.d/issue-fedora /usr/lib/issue - - # Remove any presets from other Editions. - rm -f /usr/lib/systemd/system-preset/80-*.preset - ;; - - cloud) - if [ $do_installation -gt 0 ]; then - echo "Installing Fedora Cloud Packages" - dnf install -y fedora-release-cloud - fi - - echo "VARIANT_ID=cloud" > $VARIANT_FILE - - # Ensure that the os-release file is pointing to the correct version - ln -sf ./os.release.d/os-release-cloud /usr/lib/os-release || : - - # Ensure that the issue file is pointing to the correct version - ln -sf ./os.release.d/issue-fedora /usr/lib/issue - - # Remove any presets from other Editions. - rm -f /usr/lib/systemd/system-preset/80-*.preset - ;; - - non-edition) - echo "VARIANT_ID=nonproduct" > $VARIANT_FILE - - # Ensure that the os-release file is pointing to the correct version - ln -sf ./os.release.d/os-release-fedora /usr/lib/os-release || : - - # Ensure that the issue file is pointing to the correct version - ln -sf ./os.release.d/issue-fedora /usr/lib/issue - - # Remove any presets from other Editions. - rm -f /usr/lib/systemd/system-preset/80-*.preset - ;; - - server) - if [ $do_installation -gt 0 ]; then - echo "Installing Fedora Server Packages" - dnf install -y fedora-release-server - fi - - echo "VARIANT_ID=server" > $VARIANT_FILE - - # Ensure that the os-release and issue files are pointing to the correct - # version - ln -sf ./os.release.d/os-release-server /usr/lib/os-release - ln -sf ./os.release.d/issue-server /usr/lib/issue - - # Remove any presets from other Editions. This should always be a no-op, - # but it's good to be explicit. - # We reserve 80-*.preset for Editions - rm -f /usr/lib/systemd/system-preset/80-*.preset - - # Symlink in the proper preset - ln -sf ../../os.release.d/presets/80-server.preset \ - /usr/lib/systemd/system-preset/80-server.preset - - if [ $enable_presets -gt 0 ]; then - # Enable new units specified by presets - units=$(sed -n 's/^enable//p' \ - < /usr/lib/systemd/system-preset/80-server.preset) - /usr/bin/systemctl preset $units >/dev/null 2>&1 || : - - # Disable new units specified by presets - units=$(sed -n 's/^disable//p' \ - < /usr/lib/systemd/system-preset/80-server.preset) - /usr/bin/systemctl preset $units >/dev/null 2>&1 || : - fi - ;; - - workstation) - if [ $do_installation -gt 0 ]; then - echo "Installing Fedora Workstation Packages" - dnf install -y fedora-release-workstation - fi - - echo "VARIANT_ID=workstation" > $VARIANT_FILE - # Ensure that the os-release and issue files are pointing to the correct - # version - ln -sf ./os.release.d/os-release-workstation /usr/lib/os-release - ln -sf ./os.release.d/issue-fedora /usr/lib/issue - - # Remove any presets from other Editions. This should always be a no-op, - # but it's good to be explicit. - # We reserve 80-*.preset for Editions - rm -f /usr/lib/systemd/system-preset/80-*.preset - - # Symlink in the proper preset - ln -sf ../../os.release.d/presets/80-workstation.preset \ - /usr/lib/systemd/system-preset/80-workstation.preset - - if [ $enable_presets -gt 0 ]; then - # Enable new units specified by presets - units=$(sed -n 's/^enable//p' \ - < /usr/lib/systemd/system-preset/80-workstation.preset) - /usr/bin/systemctl preset $units >/dev/null 2>&1 || : - - # Disable new units specified by presets - units=$(sed -n 's/^disable//p' \ - < /usr/lib/systemd/system-preset/80-workstation.preset) - /usr/bin/systemctl preset $units >/dev/null 2>&1 || : - fi - ;; - - *) - exit_usage - ;; -esac - -echo This system has been converted to $EDITION - -exit 0 - diff --git a/convert-to-edition.lua b/convert-to-edition.lua deleted file mode 100644 index 20f847b..0000000 --- a/convert-to-edition.lua +++ /dev/null @@ -1,186 +0,0 @@ --- This is intended to be run as an RPM scriptlet. --- Keep this file in sync with the convert-to-edition --- shell script - -local VARIANT_FILE = "/usr/lib/variant" - --- Read in /usr/lib/variant and determine the edition -local function read_variant() - local variant - local f = io.open(VARIANT_FILE, "r") - if f ~= nil then - while true do - local line = f:read() - if line == nil then - break - end - local m = line:match("^VARIANT_ID=([^\n]+)") - if m ~= nil then - variant = m - end - end - f:close() - end - return variant -end - --- Atomically replace a file with new contents -local function writefile(path, data) - local tmp = path .. ".convert-to-edition" - local f = io.open(tmp, "w+") - if f == nil then - return - end - f:write(data) - f:close() - if not os.rename(tmp, path) then - os.remove(tmp) - end -end - --- Forcibly replace a symlink -local function symlink(from, to) - os.remove(to) - assert(posix.symlink(from, to)) -end - --- Run a subroutine in a child process -local function execute(...) - local pid = posix.fork() - if pid == 0 then - posix.exec(...) - posix.exit(1) - elseif pid ~= -1 then - local status = posix.wait(pid) - if status ~= 0 then - local program = ... - error(program .. " exited with status " .. status) - end - end -end - --- Remove preset files for other editions --- This should never be necessary, but it's best to be safe -local function clear_presets() - local path = "/usr/lib/systemd/system-preset" - for file in posix.files(path) do - if file:match("^80%-.*%.preset$") then - os.remove(path .. "/" .. file) - end - end -end - - --- Get a list of presets that need to be enabled or disabled --- as part of the installation of this edition -local function read_presets(path) - local result = {} - local f = assert(io.open(path)) - if f ~= nil then - while true do - local line = f:read() - if line == nil then - break - end - local cmd, arg = line:match("^([^ \t]+)[ \t]+([^\n \t]+)") - if cmd == "enable" or cmd == "disable" then - result[#result + 1] = arg - end - end - f:close() - end - return result -end - -local function set_variant(variant) - writefile(VARIANT_FILE, "VARIANT_ID=" .. variant .. "\n") -end - -local function set_release(release) - symlink("./os.release.d/os-release-" .. release, "/usr/lib/os-release") -end - -local function set_issue(release) - symlink("./os.release.d/issue-" .. release, "/usr/lib/issue") -end --- release: the VARIANT_ID for os-release --- issue: which /etc/issue file to install --- presets: whether this edition has extra presets beyond the --- defaults to enable or disable -local variants = { - atomichost = {release = "atomichost", issue = "fedora", presets = false}, - cloud = {release = "cloud", issue = "fedora", presets = false}, - nonproduct = {release = "fedora", issue = "fedora", presets = false}, - server = {release = "server", issue = "server", presets = true}, - workstation = {release = "workstation", issue = "fedora", presets = true}, -} - --- Call out to systemctl to enable or disable presets -local function set_presets(edition, apply_presets) - if variants[edition].presets then - local target = "/usr/lib/systemd/system-preset/80-" .. edition .. ".preset" - symlink("../../os.release.d/presets/80-" .. edition .. ".preset", target) - - if apply_presets then - local presets = read_presets(target) - local systemctl = "/usr/bin/systemctl" - if posix.access(systemctl, "x") then - --fork off a systemctl call - local pid = assert(posix.fork()) - if pid == 0 then - -- Child - posix.exec(systemctl, "preset", "-q", table.unpack(presets)) - -- In case exec() fails - os.exit(17) - else - -- RPM - assert(posix.wait(pid)) - end - end - end - end -end - -local function convert_to_edition(edition, apply_presets) - local variant = variants[edition] - if variant == nil then - error("undefined edition: " .. edition) - end - set_release(variant.release) - set_issue(variant.issue) - clear_presets() - - set_presets(edition, apply_presets) -end - -local function install_edition(edition) - -- Create the variant file if it does not already exist. This needs - -- to be done on both installation and upgrade, to ensure that we - -- upgrade from F23 and earlier properly. - if not posix.access(VARIANT_FILE, "f") then - set_variant(edition) - end - if read_variant() == edition then - -- (On initial installation only), fix up after %%systemd_post - -- in packages possibly installed before our preset file was - -- added - -- On upgrades, do not enable or disable presets to avoid - -- surprising the user - local initial_install = arg[2] == 1 - convert_to_edition(edition, initial_install) - end -end - -local function uninstall_edition(edition) - -- If we are uninstalling, we need to reset the variant file and - -- force the os-release file back to os-release-fedora. We do this - -- in %%preun so that we don't have any time where the os-release - -- symlink is dangling (since in %%postun, the os-release-$EDITION - -- file will have already been removed) - if arg[2] == 0 then - if read_variant() == edition then - set_variant("nonproduct") - convert_to_edition("nonproduct", false) - end - end -end diff --git a/fedora-release.spec b/fedora-release.spec deleted file mode 100644 index 32c1a51..0000000 --- a/fedora-release.spec +++ /dev/null @@ -1,381 +0,0 @@ -%define release_name Rawhide -%define dist_version 29 -%define bug_version rawhide - -# All changes need to be submitted as pull requests in pagure -# The package can only be built by a very small number of people -# if you are not sure you can build it do not attempt to - -Summary: Fedora release files -Name: fedora-release -Version: 29 -Release: 0.8 -License: MIT -Group: System Environment/Base -URL: https://pagure.io/fedora-release -Source: %{name}-%{version}.tar.bz2 -Source1: convert-to-edition.lua -Obsoletes: redhat-release -Provides: redhat-release -Provides: system-release -Provides: system-release(%{version}) - -# Kill off the fedora-release-nonproduct package -Provides: fedora-release-nonproduct = %{version} -Obsoletes: fedora-release-nonproduct <= 23-0.3 -Provides: fedora-release-standard = 22-0.8 -Obsoletes: fedora-release-standard < 22-0.8 - - -Requires: fedora-repos(%{version}) -BuildArch: noarch - -%description -Fedora release files such as various /etc/ files that define the release. - -%package atomichost -Summary: Base package for Fedora Atomic-specific default configurations -Provides: system-release-atomichost -Provides: system-release-atomichost(%{version}) -Provides: system-release-product -Requires: fedora-release = %{version}-%{release} - -%description atomichost -Provides a base package for Fedora Atomic Host-specific configuration files to -depend on. - -%package cloud -Summary: Base package for Fedora Cloud-specific default configurations -Provides: system-release-cloud -Provides: system-release-cloud(%{version}) -Provides: system-release-product -Requires: fedora-release = %{version}-%{release} - -%description cloud -Provides a base package for Fedora Cloud-specific configuration files to -depend on. - -%package server -Summary: Base package for Fedora Server-specific default configurations -Provides: system-release-server -Provides: system-release-server(%{version}) -Provides: system-release-product -Requires: fedora-release = %{version}-%{release} -Requires: systemd -Requires: cockpit-bridge -Requires: cockpit-networkmanager -Requires: cockpit-shell -Requires: cockpit-storaged -Requires: cockpit-ws -Requires: openssh-server - -Requires(post): systemd - -%description server -Provides a base package for Fedora Server-specific configuration files to -depend on. - -%package workstation -Summary: Base package for Fedora Workstation-specific default configurations -Provides: system-release-workstation -Provides: system-release-workstation(%{version}) -Provides: system-release-product -Requires: fedora-release = %{version}-%{release} -# needed for captive portal support -Requires: NetworkManager-config-connectivity-fedora -Requires(post): /usr/bin/glib-compile-schemas -Requires(postun): /usr/bin/glib-compile-schemas - -%description workstation -Provides a base package for Fedora Workstation-specific configuration files to -depend on. - -%package -n convert-to-edition -Summary: Script for converting between Fedora Editions -Requires: fedora-release = %{version}-%{release} - -%description -n convert-to-edition -Provides a script to convert the running system between Fedora Editions - -%prep -%setup -q -sed -i 's|@@VERSION@@|%{dist_version}|g' Fedora-Legal-README.txt - -%build - -%install -install -d $RPM_BUILD_ROOT/etc -echo "Fedora release %{version} (%{release_name})" > $RPM_BUILD_ROOT/etc/fedora-release -echo "cpe:/o:fedoraproject:fedora:%{version}" > $RPM_BUILD_ROOT/etc/system-release-cpe - -# Symlink the -release files -ln -s fedora-release $RPM_BUILD_ROOT/etc/redhat-release -ln -s fedora-release $RPM_BUILD_ROOT/etc/system-release - -# Create the common os-release file -install -d $RPM_BUILD_ROOT/usr/lib/os.release.d/ -cat << EOF >>$RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-fedora -NAME=Fedora -VERSION="%{dist_version} (%{release_name})" -ID=fedora -VERSION_ID=%{dist_version} -PLATFORM_ID="platform:f%{dist_version}" -PRETTY_NAME="Fedora %{dist_version} (%{release_name})" -ANSI_COLOR="0;34" -CPE_NAME="cpe:/o:fedoraproject:fedora:%{dist_version}" -HOME_URL="https://fedoraproject.org/" -SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help" -BUG_REPORT_URL="https://bugzilla.redhat.com/" -REDHAT_BUGZILLA_PRODUCT="Fedora" -REDHAT_BUGZILLA_PRODUCT_VERSION=%{bug_version} -REDHAT_SUPPORT_PRODUCT="Fedora" -REDHAT_SUPPORT_PRODUCT_VERSION=%{bug_version} -PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy" -EOF - -# Create the common /etc/issue -echo "\S" > $RPM_BUILD_ROOT/usr/lib/os.release.d/issue-fedora -echo "Kernel \r on an \m (\l)" >> $RPM_BUILD_ROOT/usr/lib/os.release.d/issue-fedora -echo >> $RPM_BUILD_ROOT/usr/lib/os.release.d/issue-fedora - -# Create /etc/issue.net -echo "\S" > $RPM_BUILD_ROOT/usr/lib/issue.net -echo "Kernel \r on an \m (\l)" >> $RPM_BUILD_ROOT/usr/lib/issue.net -ln -s ../usr/lib/issue.net $RPM_BUILD_ROOT/etc/issue.net - -# Create os-release and issue files for the different editions - -# Atomic Host - https://bugzilla.redhat.com/show_bug.cgi?id=1200122 -cp -p $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-fedora \ - $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-atomichost -echo "VARIANT=\"Atomic Host\"" >> $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-atomichost -echo "VARIANT_ID=atomic.host" >> $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-atomichost -sed -i -e "s|(%{release_name})|(Atomic Host)|g" $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-atomichost - -# Cloud -cp -p $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-fedora \ - $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-cloud -echo "VARIANT=\"Cloud Edition\"" >> $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-cloud -echo "VARIANT_ID=cloud" >> $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-cloud -sed -i -e "s|(%{release_name})|(Cloud Edition)|g" $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-cloud - -# Server -cp -p $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-fedora \ - $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-server -echo "VARIANT=\"Server Edition\"" >> $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-server -echo "VARIANT_ID=server" >> $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-server -sed -i -e "s|(%{release_name})|(Server Edition)|g" $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-server - -cp -p $RPM_BUILD_ROOT/usr/lib/os.release.d/issue-fedora \ - $RPM_BUILD_ROOT/usr/lib/os.release.d/issue-server -echo "Admin Console: https://\4:9090/ or https://[\6]:9090/" >> $RPM_BUILD_ROOT/usr/lib/os.release.d/issue-server -echo >> $RPM_BUILD_ROOT/usr/lib/os.release.d/issue-server - -# Workstation -cp -p $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-fedora \ - $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-workstation -echo "VARIANT=\"Workstation Edition\"" >> $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-workstation -echo "VARIANT_ID=workstation" >> $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-workstation -sed -i -e "s|(%{release_name})|(Workstation Edition)|g" $RPM_BUILD_ROOT/usr/lib/os.release.d/os-release-workstation - -# Create the symlink for /etc/os-release -# We don't create the /usr/lib/os-release symlink until %%post -# so that we can ensure that the right one is referenced. -ln -s ../usr/lib/os-release $RPM_BUILD_ROOT/etc/os-release - -# Create the symlink for /etc/issue -# We don't create the /usr/lib/os-release symlink until %%post -# so that we can ensure that the right one is referenced. -ln -s ../usr/lib/issue $RPM_BUILD_ROOT/etc/issue - -# Set up the dist tag macros -install -d -m 755 $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d -cat >> $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d/macros.dist << EOF -# dist macros. - -%%fedora %{dist_version} -%%dist %{?distprefix}.fc%{dist_version} -%%fc%{dist_version} 1 -EOF - -# Add presets -mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/user-preset/ -mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system-preset/ -mkdir -p $RPM_BUILD_ROOT/usr/lib/os.release.d/presets - -# Default system wide -install -m 0644 90-default-user.preset $RPM_BUILD_ROOT/usr/lib/systemd/user-preset/ -install -m 0644 85-display-manager.preset $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system-preset/ -install -m 0644 90-default.preset $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system-preset/ -install -m 0644 99-default-disable.preset $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system-preset/ -# Fedora Server -install -m 0644 80-server.preset $RPM_BUILD_ROOT%{_prefix}/lib/os.release.d/presets/ -# Fedora Workstation -install -m 0644 80-workstation.preset $RPM_BUILD_ROOT%{_prefix}/lib/os.release.d/presets/ - -# Override the list of enabled gnome-shell extensions for Workstation -mkdir -p $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas/ -install -m 0644 org.gnome.shell.gschema.override $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas/ -mkdir -p $RPM_BUILD_ROOT%{_datadir}/polkit-1/rules.d/ -install -m 0644 org.projectatomic.rpmostree1.rules $RPM_BUILD_ROOT%{_datadir}/polkit-1/rules.d/ - -# Copy the make_edition script to /usr/sbin -mkdir -p $RPM_BUILD_ROOT/%{_prefix}/sbin/ -install -m 0755 convert-to-edition $RPM_BUILD_ROOT/%{_prefix}/sbin/ - -%post -p -%include %{_sourcedir}/convert-to-edition.lua --- On initial installation, we'll at least temporarily put the non-product --- symlinks in place. It will be overridden by fedora-release-$EDITION --- %%post sections because we don't write the /usr/lib/variant file until --- %%posttrans to avoid trumping the fedora-release-$EDITION packages. --- This is necessary to avoid breaking systemctl scripts since they rely on --- /usr/lib/os-release being valid. We can't wait until %%posttrans to default --- to os-release-fedora. -if arg[2] == "0" then - set_release(fedora) - set_issue(fedora) -end - --- We also want to forcibly set these paths on upgrade if we are explicitly --- set to "nonproduct" -if read_variant() == "nonproduct" then - convert_to_edition("nonproduct", false) -end - -%posttrans -p -%include %{_sourcedir}/convert-to-edition.lua --- If we get to %%posttrans and nothing created /usr/lib/variant, set it to --- nonproduct. -install_edition("nonproduct") - -%post atomichost -p -%include %{_sourcedir}/convert-to-edition.lua -install_edition("atomichost") - -%preun atomichost -p -%include %{_sourcedir}/convert-to-edition.lua -uninstall_edition("atomichost") - -%post cloud -p -%include %{_sourcedir}/convert-to-edition.lua -install_edition("cloud") - -%preun cloud -p -%include %{_sourcedir}/convert-to-edition.lua -uninstall_edition("cloud") - -%post server -p -%include %{_sourcedir}/convert-to-edition.lua -install_edition("server") - -%preun server -p -%include %{_sourcedir}/convert-to-edition.lua -uninstall_edition("server") - -%post workstation -p -%include %{_sourcedir}/convert-to-edition.lua -install_edition("workstation") - -%preun workstation -p -%include %{_sourcedir}/convert-to-edition.lua -uninstall_edition("workstation") - -%postun workstation -if [ $1 -eq 0 ] ; then - glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : -fi - -%posttrans workstation -glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : - - -%files -%defattr(-,root,root,-) -%{!?_licensedir:%global license %%doc} -%license LICENSE Fedora-Legal-README.txt -%ghost /usr/lib/variant -%dir /usr/lib/os.release.d -%dir /usr/lib/os.release.d/presets -%attr(0644,root,root) /usr/lib/os.release.d/os-release-fedora -%ghost /usr/lib/os-release -/etc/os-release -%config %attr(0644,root,root) /etc/fedora-release -/etc/redhat-release -/etc/system-release -%config %attr(0644,root,root) /etc/system-release-cpe -%attr(0644,root,root) /usr/lib/os.release.d/issue-fedora -%ghost /usr/lib/issue -%config(noreplace) /etc/issue -%attr(0644,root,root) /usr/lib/issue.net -%config(noreplace) /etc/issue.net -%attr(0644,root,root) %{_rpmconfigdir}/macros.d/macros.dist -%dir /usr/lib/systemd/user-preset/ -%{_prefix}/lib/systemd/user-preset/90-default-user.preset -%dir %{_prefix}/lib/systemd/system-preset/ -%{_prefix}/lib/systemd/system-preset/85-display-manager.preset -%{_prefix}/lib/systemd/system-preset/90-default.preset -%{_prefix}/lib/systemd/system-preset/99-default-disable.preset - - -%files atomichost -%{!?_licensedir:%global license %%doc} -%license LICENSE -%attr(0644,root,root) /usr/lib/os.release.d/os-release-atomichost - - -%files cloud -%{!?_licensedir:%global license %%doc} -%license LICENSE -%attr(0644,root,root) /usr/lib/os.release.d/os-release-cloud - - -%files server -%{!?_licensedir:%global license %%doc} -%license LICENSE -%attr(0644,root,root) /usr/lib/os.release.d/os-release-server -%attr(0644,root,root) /usr/lib/os.release.d/issue-server -%ghost %{_prefix}/lib/systemd/system-preset/80-server.preset -%attr(0644,root,root) /usr/lib/os.release.d/presets/80-server.preset - -%files workstation -%{!?_licensedir:%global license %%doc} -%license LICENSE -%attr(0644,root,root) /usr/lib/os.release.d/os-release-workstation -%{_datadir}/glib-2.0/schemas/org.gnome.shell.gschema.override -%ghost %{_prefix}/lib/systemd/system-preset/80-workstation.preset -%attr(0644,root,root) /usr/lib/os.release.d/presets/80-workstation.preset -%attr(0644,root,root) /usr/share/polkit-1/rules.d/org.projectatomic.rpmostree1.rules - -%files -n convert-to-edition -/usr/sbin/convert-to-edition - -%changelog -* Tue Jul 31 2018 Stephen Gallagher - 29-0.8 -- Drop Recommends: fedora-repos-modular from Server Edition since it has been - merged into fedora-repos. - -* Tue Jul 10 2018 Adam Williamson - 29-0.7 -- Drop rolekit from Server presets too - -* Mon Jul 09 2018 Adam Williamson - 29-0.6 -- Server: don't require rolekit (not installable, soon to be retired) - -* Fri Jun 22 2018 Mohan Boddu - 29-0.5 -- Add selinux-autorelabel-mark.service to default presets -- Enable the pipewire service for user sessions -- fedora-* renamed to OS independent names -- Fix pattern-match in convert-to-edition.lua - -* Fri May 25 2018 Stephen Gallagher - 29-0.4 -- Add fedora-repos-modular to Fedora Server installs - -* Thu Apr 19 2018 Hans de Goede - 29-0.3 -- Enable the virtualbox-guest-additions service (vboxservice.service) -- Add PLATFORM_ID to /etc/os-release - -* Thu Feb 22 2018 Matthias Clasen - 29-0.2 -- Add polkit rules to let gnome-software update Atomic Workstation - -* Mon Feb 19 2018 Mohan Boddu - 29-0.1 -- Setup for rawhide being f29 diff --git a/org.gnome.shell.gschema.override b/org.gnome.shell.gschema.override deleted file mode 100644 index cc2ab8d..0000000 --- a/org.gnome.shell.gschema.override +++ /dev/null @@ -1,2 +0,0 @@ -[org.gnome.shell] -enabled-extensions=['background-logo@fedorahosted.org'] diff --git a/org.projectatomic.rpmostree1.rules b/org.projectatomic.rpmostree1.rules deleted file mode 100644 index 75ae406..0000000 --- a/org.projectatomic.rpmostree1.rules +++ /dev/null @@ -1,20 +0,0 @@ -polkit.addRule(function(action, subject) { - if ((action.id == "org.projectatomic.rpmostree1.install-uninstall-packages" || - action.id == "org.projectatomic.rpmostree1.install-local-packages" || - action.id == "org.projectatomic.rpmostree1.override" || - action.id == "org.projectatomic.rpmostree1.deploy" || - action.id == "org.projectatomic.rpmostree1.upgrade" || - action.id == "org.projectatomic.rpmostree1.rebase" || - action.id == "org.projectatomic.rpmostree1.rollback" || - action.id == "org.projectatomic.rpmostree1.bootconfig" || - action.id == "org.projectatomic.rpmostree1.reload-daemon" || - action.id == "org.projectatomic.rpmostree1.cancel" || - action.id == "org.projectatomic.rpmostree1.cleanup" || - action.id == "org.projectatomic.rpmostree1.repo-refresh" || - action.id == "org.projectatomic.rpmostree1.client-management") && - subject.active == true && - subject.local == true && - subject.isInGroup("wheel")) { - return polkit.Result.YES; - } -});