- Remove "Recommends: restorecond" from selinux pattern as we don't

want it to be installed by default.

OBS-URL: https://build.opensuse.org/package/show/system:install:head/patterns-base?expand=0&rev=255
This commit is contained in:
Dominique Leuenberger 2024-11-07 07:28:19 +00:00 committed by Git OBS Bridge
commit ca46ca8676
8 changed files with 7845 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,178 @@
#!/usr/bin/perl
use strict;
use warnings;
my $verbose = 0;
my $pat_ext = "32bit";
my $product = "";
my @skip_pat = ();
sub get_file {
my $file_to_get = shift;
my $content = "";
open FILE, "<$file_to_get" or return "\n";
while (defined (my $line = <FILE>)) {
next if ($line =~ m/^#/);
$content .= $line;
}
close FILE;
return $content;
}
sub print_usage {
print "$0 [-v] [-h]\n";
exit 0;
}
sub print_debug {
my ($txt, $lvl) = @_;
print (STDERR "DBG: ${txt}\n") if($verbose >= $lvl);
}
sub parse_line {
my $to_parse = shift;
my $tmp = "";
if ($to_parse =~ /%include/) {
# TBD
print "%include at unexpected position, exiting\n";
exit (1);
}
if ($to_parse =~ /Summary:/) {
return "$to_parse\n";
}
# XXX simplify me
if ($to_parse =~ /Recommends:\s*([^\s]*)\s*/) {
$tmp = "$1";
return "" if ($tmp =~ m/pattern()/);
return "" if ($tmp =~ m/.*-64bit\s*$/);
if ($tmp =~ m/\(/) {
print STDERR "WARN: Unhandled boolean dep at $to_parse\n";
return "";
}
$tmp = "${tmp}-32bit" if($tmp !~ m/.*-32bit/);
return "Recommends: ${tmp}\n";
}
if ($to_parse =~ /Requires:\s*([^\s]*)\s*/) {
$tmp = "$1";
return "" if ($tmp =~ m/pattern()/);
return "" if ($tmp =~ m/.*-64bit\s*$/);
$tmp = "${tmp}-32bit" if($tmp !~ m/.*-32bit/);
return "Recommends: ${tmp}\n";
}
return "";
}
sub parse_main_file {
my $main_file = shift;
my $spec_file = "";
my $cur_pattern = "";
my $skip_it = 1;
my %skip_pat_hash;
if(! open (MAIN_FILE, "<$main_file")) {
print STDERR "${main_file} not found, exiting\n";
exit 1;
}
while (defined (my $line = <MAIN_FILE>)) {
chomp($line);
next if ($line =~ m/^#/);
if ($line =~ m/\%package/) {
if(($line =~ m/32bit/) or
($line =~ m/64bit/)
) {
$skip_it = 1;
} else {
%skip_pat_hash = map { $_ => 1 } @skip_pat;
if($skip_it==0&&!exists($skip_pat_hash{$cur_pattern})) {
$spec_file .= ""
."Provides: pattern() = ${cur_pattern}%2d32bit\n"
."Group: Metapackages\n"
."Supplements: packageand(patterns-${product}-${pat_ext}:patterns-${product}-${cur_pattern})\n"
."\n"
."%files ${cur_pattern}-32bit\n"
."%defattr(-,root,root)\n"
."%dir /usr/share/doc/packages/patterns\n"
."/usr/share/doc/packages/patterns/${cur_pattern}-${pat_ext}.txt\n"
."\n"
."%description ${cur_pattern}-${pat_ext}\n"
."The ${pat_ext} pattern complementing ${cur_pattern}.\n"
."#\n"
."#-------------------------------------------------------------------\n"
."#\n";
}
$skip_it = 0 ;
$line =~ m/package\s*([^\s]*)\s*/;
$cur_pattern = $1;
if (!exists($skip_pat_hash{$cur_pattern})) {
$spec_file .= "%package ${cur_pattern}-32bit\n";
}
}
}
next if($skip_it == 1 );
if ($line =~ /%include/) {
my $file_to_check = ($line =~ m/%include.*?([^\/\s]*)$/)[0]; # beware the non-greedy '?'
next if($file_to_check =~ m/32bit/);
if( open TMP_FILE, "<$file_to_check") {
print_debug(" Checking INCLUDE: $file_to_check", 2);
while (defined (my $include_line = <TMP_FILE>)) {
if (!exists($skip_pat_hash{$cur_pattern})) {
$spec_file .= parse_line($include_line);
}
}
close TMP_FILE;
}
next;
}
if (!exists($skip_pat_hash{$cur_pattern})) {
$spec_file .= parse_line($line);
}
}
%skip_pat_hash = map { $_ => 1 } @skip_pat;
if (!exists($skip_pat_hash{$cur_pattern})) {
# I hate this, but need a fast workaround
$spec_file .= "Provides: pattern-invisible()\n"
."Provides: pattern() = ${cur_pattern}%2d${pat_ext}\n"
."Group: Metapackages\n"
."Supplements: packageand(patterns-${product}-${pat_ext}:patterns-${product}-${cur_pattern})\n"
."\n"
."%files ${cur_pattern}-32bit\n"
."%defattr(-,root,root)\n"
."%dir /usr/share/doc/packages/patterns\n"
."/usr/share/doc/packages/patterns/${cur_pattern}-${pat_ext}.txt\n"
."\n"
."%description ${cur_pattern}-${pat_ext}\n"
."The ${pat_ext} pattern complementing ${cur_pattern}.\n"
."\n";
}
close MAIN_FILE;
my $new_file = $spec_file;
return $new_file;
}
while ($ARGV[0] && $ARGV[0] =~ /^-/) {
my $arg = shift;
if ($arg =~ /-v/) {
$verbose += 1;
} elsif($arg =~ /-h/) {
print_usage();
exit();
} elsif($arg =~ /-p/) {
$product=shift;
} elsif($arg =~ /-e/) {
$pat_ext=shift;
} elsif($arg =~ /-s/) {
push @skip_pat, shift;
}
}
print_debug("product = ${product}\n pat_ext=${pat_ext}\n", 1);
my $result = parse_main_file("patterns-${product}.spec");
print "${result}\n";
exit 0;

View File

@ -0,0 +1,329 @@
%package apparmor-32bit
Summary: AppArmor
Recommends: apparmor-abstractions-32bit
Recommends: apparmor-parser-32bit
Recommends: apparmor-profiles-32bit
Recommends: apparmor-docs-32bit
Recommends: apparmor-utils-32bit
Recommends: yast2-apparmor-32bit
Recommends: audit-32bit
Recommends: audit-32bit
Provides: pattern() = apparmor%2d32bit
Group: Metapackages
Supplements: packageand(patterns-base-32bit:patterns-base-apparmor)
%files apparmor-32bit
%defattr(-,root,root)
%dir /usr/share/doc/packages/patterns
/usr/share/doc/packages/patterns/apparmor-32bit.txt
%description apparmor-32bit
The 32bit pattern complementing apparmor.
#
#-------------------------------------------------------------------
#
%package base-32bit
Summary: Base System
Recommends: aaa_base-32bit
Recommends: bash-32bit
Recommends: ca-certificates-mozilla-32bit
Recommends: coreutils-32bit
Recommends: glibc-32bit
Recommends: libnss_usrfiles2-32bit
Recommends: pam-32bit
Recommends: pam-config-32bit
Recommends: purge-kernels-service-32bit
Recommends: rpm-32bit
Recommends: system-user-nobody-32bit
Recommends: systemd-32bit
Recommends: util-linux-32bit
Recommends: busybox-static-32bit
Recommends: elfutils-32bit
Recommends: glibc-locale-base-32bit
Recommends: hostname-32bit
Recommends: iproute2-32bit
Recommends: issue-generator-32bit
Recommends: pam_pwquality-32bit
Recommends: shadow-32bit
Recommends: system-group-trusted-32bit
Recommends: system-group-wheel-32bit
Recommends: system-user-bin-32bit
Recommends: system-user-daemon-32bit
Recommends: terminfo-32bit
Recommends: terminfo-iterm-32bit
Recommends: terminfo-screen-32bit
Recommends: timezone-32bit
Recommends: zypper-32bit
Recommends: aaa_base-malloccheck-32bit
Recommends: SUSEConnect-32bit
Recommends: btrfsprogs-32bit
Recommends: e2fsprogs-32bit
Recommends: rollback-helper-32bit
Recommends: xfsprogs-32bit
Recommends: ppc64-diag-32bit
Provides: pattern() = base%2d32bit
Group: Metapackages
Supplements: packageand(patterns-base-32bit:patterns-base-base)
%files base-32bit
%defattr(-,root,root)
%dir /usr/share/doc/packages/patterns
/usr/share/doc/packages/patterns/base-32bit.txt
%description base-32bit
The 32bit pattern complementing base.
#
#-------------------------------------------------------------------
#
%package enhanced_base-32bit
Summary: Enhanced Base System
Recommends: openssh-32bit
Recommends: aaa_base-extras-32bit
Recommends: acl-32bit
Recommends: attr-32bit
Recommends: bash-completion-32bit
Recommends: bind-utils-32bit
Recommends: bzip2-32bit
Recommends: cifs-utils-32bit
Recommends: command-not-found-32bit
Recommends: cpio-32bit
Recommends: cpupower-32bit
Recommends: cryptsetup-32bit
Recommends: curl-32bit
Recommends: deltarpm-32bit
Recommends: diffutils-32bit
Recommends: dos2unix-32bit
Recommends: e2fsprogs-32bit
Recommends: ethtool-32bit
Recommends: file-32bit
Recommends: fillup-32bit
Recommends: findutils-32bit
Recommends: firewalld-32bit
Recommends: fuse-32bit
Recommends: gawk-32bit
Recommends: gettext-runtime-32bit
Recommends: glibc-locale-32bit
Recommends: gpart-32bit
Recommends: gpg2-32bit
Recommends: gpm-32bit
Recommends: grep-32bit
Recommends: gzip-32bit
Recommends: hdparm-32bit
Recommends: hwinfo-32bit
Recommends: info-32bit
Recommends: initviocons-32bit
Recommends: iputils-32bit
Recommends: irqbalance-32bit
Recommends: kmod-compat-32bit
Recommends: kpartx-32bit
Recommends: krb5-32bit
Recommends: less-32bit
Recommends: logrotate-32bit
Recommends: lsscsi-32bit
Recommends: mailx-32bit
Recommends: man-32bit
Recommends: mdadm-32bit
Recommends: multipath-tools-32bit
Recommends: ncurses-utils-32bit
Recommends: net-snmp-32bit
Recommends: netcat-openbsd-32bit
Recommends: netcfg-32bit
Recommends: nscd-32bit
Recommends: ntfs-3g-32bit
Recommends: ntfsprogs-32bit
Recommends: pam-config-32bit
Recommends: parted-32bit
Recommends: pciutils-32bit
Recommends: pciutils-ids-32bit
Recommends: perl-Bootloader-32bit
Recommends: perl-base-32bit
Recommends: pinentry-32bit
Recommends: plymouth-32bit
Recommends: psmisc-32bit
Recommends: rsync-32bit
Recommends: screen-32bit
Recommends: sed-32bit
Recommends: sg3_utils-32bit
Recommends: smartmontools-32bit
Recommends: sudo-32bit
Recommends: systemd-sysvinit-32bit
Recommends: time-32bit
Recommends: timezone-32bit
Recommends: udev-configure-printer-32bit
Recommends: udev-extra-rules-32bit
Recommends: usbutils-32bit
Recommends: vim-32bit
Recommends: wget-32bit
Recommends: xz-32bit
Recommends: zisofs-tools-32bit
Recommends: rsyslog-32bit
Recommends: systemd-logger-32bit
Recommends: dmidecode-32bit
Recommends: hfsutils-32bit
Recommends: mouseemu-32bit
Recommends: pdisk-32bit
Recommends: powerpc32-32bit
Recommends: dmraid-32bit
Recommends: dosfstools-32bit
Recommends: ifplugd-32bit
Recommends: klogd-32bit
Recommends: mpt-status-32bit
Recommends: nano-32bit
Recommends: openldap2-client-32bit
Recommends: prctl-32bit
Recommends: procinfo-32bit
Recommends: procmail-32bit
Recommends: providers-32bit
Recommends: psmisc-32bit
Recommends: setserial-32bit
Recommends: sharutils-32bit
Recommends: smp_utils-32bit
Recommends: spax-32bit
Recommends: strace-32bit
Recommends: terminfo-32bit
Recommends: tnftp-32bit
Recommends: tuned-32bit
Recommends: vlan-32bit
Recommends: wireless-tools-32bit
Recommends: wol-32bit
Recommends: acpica-32bit
Recommends: mcelog-32bit
Recommends: numactl-32bit
Provides: pattern() = enhanced_base%2d32bit
Group: Metapackages
Supplements: packageand(patterns-base-32bit:patterns-base-enhanced_base)
%files enhanced_base-32bit
%defattr(-,root,root)
%dir /usr/share/doc/packages/patterns
/usr/share/doc/packages/patterns/enhanced_base-32bit.txt
%description enhanced_base-32bit
The 32bit pattern complementing enhanced_base.
#
#-------------------------------------------------------------------
#
%package minimal_base-32bit
Summary: Minimal Appliance Base
Recommends: branding-32bit
Recommends: build-key-32bit
Recommends: distribution-release-32bit
Recommends: filesystem-32bit
Provides: pattern() = minimal_base%2d32bit
Group: Metapackages
Supplements: packageand(patterns-base-32bit:patterns-base-minimal_base)
%files minimal_base-32bit
%defattr(-,root,root)
%dir /usr/share/doc/packages/patterns
/usr/share/doc/packages/patterns/minimal_base-32bit.txt
%description minimal_base-32bit
The 32bit pattern complementing minimal_base.
#
#-------------------------------------------------------------------
#
%package sw_management-32bit
Summary: Software Management
Recommends: lifecycle-data-32bit
Recommends: zypper-lifecycle-plugin-32bit
Recommends: zypper-32bit
Provides: pattern() = sw_management%2d32bit
Group: Metapackages
Supplements: packageand(patterns-base-32bit:patterns-base-sw_management)
%files sw_management-32bit
%defattr(-,root,root)
%dir /usr/share/doc/packages/patterns
/usr/share/doc/packages/patterns/sw_management-32bit.txt
%description sw_management-32bit
The 32bit pattern complementing sw_management.
#
#-------------------------------------------------------------------
#
%package x11-32bit
Summary: X Window System
Recommends: xf86-input-libinput-32bit
Recommends: xorg-x11-fonts-core-32bit
Recommends: xorg-x11-server-32bit
Recommends: dejavu-fonts-32bit
Recommends: libyui-qt-32bit
Recommends: libyui-qt-pkg-32bit
Recommends: noto-sans-fonts-32bit
Recommends: tigervnc-32bit
Recommends: x11-tools-32bit
Recommends: xdmbgrd-32bit
Recommends: xorg-x11-Xvnc-32bit
Recommends: xorg-x11-driver-video-32bit
Recommends: xorg-x11-essentials-32bit
Recommends: xorg-x11-fonts-32bit
Recommends: xorg-x11-server-extra-32bit
Recommends: xterm-32bit
Recommends: xtermset-32bit
Recommends: yast2-control-center-32bit
Recommends: xf86-input-vmmouse-32bit
Recommends: xf86-input-wacom-32bit
Provides: pattern() = x11%2d32bit
Group: Metapackages
Supplements: packageand(patterns-base-32bit:patterns-base-x11)
%files x11-32bit
%defattr(-,root,root)
%dir /usr/share/doc/packages/patterns
/usr/share/doc/packages/patterns/x11-32bit.txt
%description x11-32bit
The 32bit pattern complementing x11.
#
#-------------------------------------------------------------------
#
%package x11_enhanced-32bit
Summary: X Window System
Recommends: glibc-locale-32bit
Recommends: glibc-locale-base-32bit
Recommends: xkeyboard-config-32bit
Recommends: xorg-x11-essentials-32bit
Recommends: cabextract-32bit
Recommends: command-not-found-32bit
Recommends: dbus-1-glib-32bit
Recommends: dbus-1-x11-32bit
Recommends: dialog-32bit
Recommends: fontconfig-32bit
Recommends: fonts-config-32bit
Recommends: fribidi-32bit
Recommends: ghostscript-x11-32bit
Recommends: numlockx-32bit
Recommends: opensuse-welcome-32bit
Recommends: translation-update-32bit
Recommends: web_browser-32bit
Recommends: xauth-32bit
Recommends: xdmbgrd-32bit
Recommends: xkeyboard-config-32bit
Recommends: xorg-x11-fonts-32bit
Recommends: xorg-x11-fonts-core-32bit
Recommends: yast2-control-center-gnome-32bit
Recommends: yast2-network-32bit
Recommends: MozillaFirefox-branding-SLE-32bit
Recommends: desktop-data-SLE-32bit
Recommends: numlockx-32bit
Recommends: openssh-askpass-32bit
Recommends: susepaste-32bit
Recommends: susepaste-screenshot-32bit
Recommends: x11-tools-32bit
Recommends: xorg-x11-libX11-ccache-32bit
Provides: pattern() = x11_enhanced%2d32bit
Group: Metapackages
Supplements: packageand(patterns-base-32bit:patterns-base-x11_enhanced)
%files x11_enhanced-32bit
%defattr(-,root,root)
%dir /usr/share/doc/packages/patterns
/usr/share/doc/packages/patterns/x11_enhanced-32bit.txt
%description x11_enhanced-32bit
The 32bit pattern complementing x11_enhanced.
#
#-------------------------------------------------------------------
#

3
patterns-base-rpmlintrc Normal file
View File

@ -0,0 +1,3 @@
addFilter("E: no-binary");

6240
patterns-base.changes Normal file

File diff suppressed because it is too large Load Diff

1068
patterns-base.spec Normal file

File diff suppressed because it is too large Load Diff

3
pre_checkin.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
perl create_32bit-patterns_file.pl -p base -s apparmor_opt -s basesystem -s basic_desktop -s bootloader -s console -s documentation -s enhanced_base_opt -s fips -s minimal_base_conflicts -s readonly_root_tools -s selinux -s transactional_base -s update_test -s x11_opt -s x11_raspberrypi > pattern-definition-32bit.txt