From 12e91163a3c7054e1ebf4a725dc2b2fbe4fefd41 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Aug 06 2018 17:08:23 +0000 Subject: Import the actual contents of the fedora-release tar and adjust build Import tar file contents to contain the contents of fedora-release from the distro git repository. This then becomes the one canonical location of the status and all changes are then to be submitted to the src.fedoraproject.org qpackage repo as git commits to be reviewed. Signed-off-by: Peter Robinson --- diff --git a/.gitignore b/.gitignore index a8ee149..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +0,0 @@ -fedora-release-14.tar.bz2 -fedora-release-15.tar.bz2 -/fedora-release-16.tar.bz2 -/fedora-release-17.tar.bz2 -/fedora-release-18.tar.bz2 -/fedora-release-19.tar.bz2 -/fedora-release-20.tar.bz2 -/fedora-release-21.tar.bz2 -/fedora-release-22.tar.bz2 -/fedora-release-23.tar.bz2 -/fedora-release-24.tar.bz2 -/fedora-release-25.tar.bz2 -/fedora-release-26.tar.bz2 -/fedora-release-27.tar.bz2 -/fedora-release-28.tar.bz2 -/fedora-release-29.tar.bz2 diff --git a/80-server.preset b/80-server.preset new file mode 100644 index 0000000..4387548 --- /dev/null +++ b/80-server.preset @@ -0,0 +1,6 @@ +# +# Fedora Server +# + +# The Cockpit web-based system management console +enable cockpit.socket diff --git a/80-workstation.preset b/80-workstation.preset new file mode 100644 index 0000000..7e250fb --- /dev/null +++ b/80-workstation.preset @@ -0,0 +1,15 @@ +# +# 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 new file mode 100644 index 0000000..08d5060 --- /dev/null +++ b/85-display-manager.preset @@ -0,0 +1,11 @@ +# 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 new file mode 100644 index 0000000..690831d --- /dev/null +++ b/90-default-user.preset @@ -0,0 +1,4 @@ +# 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 new file mode 100644 index 0000000..710832e --- /dev/null +++ b/90-default.preset @@ -0,0 +1,261 @@ +# 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 new file mode 100644 index 0000000..1f29b50 --- /dev/null +++ b/99-default-disable.preset @@ -0,0 +1 @@ +disable * diff --git a/Fedora-Legal-README.txt b/Fedora-Legal-README.txt new file mode 100644 index 0000000..6ef77b6 --- /dev/null +++ b/Fedora-Legal-README.txt @@ -0,0 +1,48 @@ += 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 29 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 29" 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/29/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 new file mode 100644 index 0000000..df0d7c3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +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/convert-to-edition b/convert-to-edition new file mode 100755 index 0000000..6bc9ea4 --- /dev/null +++ b/convert-to-edition @@ -0,0 +1,183 @@ +#!/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/fedora-release.spec b/fedora-release.spec index df6c349..0b31c01 100644 --- a/fedora-release.spec +++ b/fedora-release.spec @@ -13,8 +13,20 @@ Release: 0.8 License: MIT URL: https://pagure.io/fedora-release -Source: %{name}-%{version}.tar.bz2 -Source1: convert-to-edition.lua +Source1: LICENSE +Source2: Fedora-Legal-README.txt +Source3: convert-to-edition +Source4: convert-to-edition.lua + +Source10: 85-display-manager.preset +Source11: 90-default.preset +Source12: 90-default-user.preset +Source13: 99-default-disable.preset +Source14: 80-server.preset +Source15: 80-workstation.preset +Source16: org.gnome.shell.gschema.override +Source17: org.projectatomic.rpmostree1.rules + Obsoletes: redhat-release Provides: redhat-release Provides: system-release @@ -91,8 +103,7 @@ Requires: fedora-release = %{version}-%{release} 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 +sed -i 's|@@VERSION@@|%{dist_version}|g' %{SOURCE2} %build @@ -191,33 +202,38 @@ cat >> $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d/macros.dist << EOF %%fc%{dist_version} 1 EOF +# Install licenses +install -d $RPM_BUILD_ROOT%{_datadir}/licenses/%{name}/ +install -pm 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/licenses/%{name}/LICENSE +install -pm 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/licenses/%{name}/Fedora-Legal-README.txt + # 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/ +install -m 0644 %{SOURCE10} $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system-preset/ +install -m 0644 %{SOURCE11} $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system-preset/ +install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT/usr/lib/systemd/user-preset/ +install -m 0644 %{SOURCE13} $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/ +install -m 0644 %{SOURCE14} $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/ +install -m 0644 %{SOURCE15} $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/ +install -m 0644 %{SOURCE16} $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/ +install -m 0644 %{SOURCE17} $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/ +install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT/%{_prefix}/sbin/ %post -p -%include %{_sourcedir}/convert-to-edition.lua +%include %{SOURCE4} -- 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 @@ -237,41 +253,41 @@ if read_variant() == "nonproduct" then end %posttrans -p -%include %{_sourcedir}/convert-to-edition.lua +%include %{SOURCE4} -- 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 +%include %{SOURCE4} install_edition("atomichost") %preun atomichost -p -%include %{_sourcedir}/convert-to-edition.lua +%include %{SOURCE4} uninstall_edition("atomichost") %post cloud -p -%include %{_sourcedir}/convert-to-edition.lua +%include %{SOURCE4} install_edition("cloud") %preun cloud -p -%include %{_sourcedir}/convert-to-edition.lua +%include %{SOURCE4} uninstall_edition("cloud") %post server -p -%include %{_sourcedir}/convert-to-edition.lua +%include %{SOURCE4} install_edition("server") %preun server -p -%include %{_sourcedir}/convert-to-edition.lua +%include %{SOURCE4} uninstall_edition("server") %post workstation -p -%include %{_sourcedir}/convert-to-edition.lua +%include %{SOURCE4} install_edition("workstation") %preun workstation -p -%include %{_sourcedir}/convert-to-edition.lua +%include %{SOURCE4} uninstall_edition("workstation") %postun workstation @@ -310,24 +326,20 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %files atomichost -%license LICENSE %attr(0644,root,root) /usr/lib/os.release.d/os-release-atomichost %files cloud -%license LICENSE %attr(0644,root,root) /usr/lib/os.release.d/os-release-cloud %files server -%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 -%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 diff --git a/org.gnome.shell.gschema.override b/org.gnome.shell.gschema.override new file mode 100644 index 0000000..cc2ab8d --- /dev/null +++ b/org.gnome.shell.gschema.override @@ -0,0 +1,2 @@ +[org.gnome.shell] +enabled-extensions=['background-logo@fedorahosted.org'] diff --git a/org.projectatomic.rpmostree1.rules b/org.projectatomic.rpmostree1.rules new file mode 100644 index 0000000..75ae406 --- /dev/null +++ b/org.projectatomic.rpmostree1.rules @@ -0,0 +1,20 @@ +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; + } +}); diff --git a/sources b/sources deleted file mode 100644 index bc87216..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (fedora-release-29.tar.bz2) = de784720726258edb3a4e763cda106cab45f5d9fa196bb9c0c673c8d8975e9e78a64ee35d1b5a8412f341d1f03222130dfc85e7e979cf51ea83c9dbd87830e18