From 20a7790bbb5a1a90e6084f1b4440fc218dd5401a1f7ce1541eb281af93e49a93 Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Mon, 1 Oct 2018 15:30:44 +0000 Subject: [PATCH 1/3] Accepting request 638843 from home:sbrabec:branches:util-linux-cleanup - Drop obsolete downstream ppc utilities chrp-addnote and mkzimage_cmdline (boo#1109284). - Drop obsolete setctsid (boo#1109290). OBS-URL: https://build.opensuse.org/request/show/638843 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=380 --- addnote.c | 205 ------------------------------------- mkzimage_cmdline.8 | 20 ---- mkzimage_cmdline.c | 185 --------------------------------- python3-libmount.changes | 7 ++ python3-libmount.spec | 37 +------ setctsid.8 | 25 ----- setctsid.c | 90 ---------------- util-linux-systemd.changes | 7 ++ util-linux-systemd.spec | 37 +------ util-linux.changes | 7 ++ util-linux.spec | 37 +------ 11 files changed, 24 insertions(+), 633 deletions(-) delete mode 100644 addnote.c delete mode 100644 mkzimage_cmdline.8 delete mode 100644 mkzimage_cmdline.c delete mode 100644 setctsid.8 delete mode 100644 setctsid.c diff --git a/addnote.c b/addnote.c deleted file mode 100644 index d2be416..0000000 --- a/addnote.c +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Program to hack in a PT_NOTE program header entry in an ELF file. - * This is needed for OF on RS/6000s to load an image correctly. - * Note that OF needs a program header entry for the note, not an - * ELF section. - * - * Copyright 2000 Paul Mackerras. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - * Usage: addnote zImage - */ -#include -#include -#include -#include -#include - -/* CHRP note section */ -char arch[] = "PowerPC"; - -#define N_DESCR 6 -unsigned int descr[N_DESCR] = { - 0xffffffff, /* real-mode = true */ - 0x02000000, /* real-base, i.e. where we expect OF to be */ - 0xffffffff, /* real-size */ - 0xffffffff, /* virt-base */ - 0xffffffff, /* virt-size */ - 0x4000, /* load-base */ -}; - -/* RPA note section */ -char rpaname[] = "IBM,RPA-Client-Config"; - -/* - * Note: setting ignore_my_client_config *should* mean that OF ignores - * all the other fields, but there is a firmware bug which means that - * it looks at the splpar field at least. So these values need to be - * reasonable. - */ -#define N_RPA_DESCR 8 -unsigned int rpanote[N_RPA_DESCR] = { - 0, /* lparaffinity */ - 64, /* min_rmo_size */ - 0, /* min_rmo_percent */ - 40, /* max_pft_size */ - 1, /* splpar */ - -1, /* min_load */ - 0, /* new_mem_def */ - 1, /* ignore_my_client_config */ -}; - -#define ROUNDUP(len) (((len) + 3) & ~3) - -unsigned char buf[512]; - -#define GET_16BE(off) ((buf[off] << 8) + (buf[(off)+1])) -#define GET_32BE(off) ((GET_16BE(off) << 16) + GET_16BE((off)+2)) - -#define PUT_16BE(off, v) (buf[off] = ((v) >> 8) & 0xff, \ - buf[(off) + 1] = (v) & 0xff) -#define PUT_32BE(off, v) (PUT_16BE((off), (v) >> 16), \ - PUT_16BE((off) + 2, (v))) - -/* Structure of an ELF file */ -#define E_IDENT 0 /* ELF header */ -#define E_PHOFF 28 -#define E_PHENTSIZE 42 -#define E_PHNUM 44 -#define E_HSIZE 52 /* size of ELF header */ - -#define EI_MAGIC 0 /* offsets in E_IDENT area */ -#define EI_CLASS 4 -#define EI_DATA 5 - -#define PH_TYPE 0 /* ELF program header */ -#define PH_OFFSET 4 -#define PH_FILESZ 16 -#define PH_HSIZE 32 /* size of program header */ - -#define PT_NOTE 4 /* Program header type = note */ - -#define ELFCLASS32 1 -#define ELFDATA2MSB 2 - -unsigned char elf_magic[4] = { 0x7f, 'E', 'L', 'F' }; - -int -main(int ac, char **av) -{ - int fd, n, i; - int ph, ps, np; - int nnote, nnote2, ns; - - if (ac != 2) { - fprintf(stderr, "Usage: %s elf-file\n", av[0]); - exit(1); - } - fd = open(av[1], O_RDWR); - if (fd < 0) { - perror(av[1]); - exit(1); - } - - nnote = 12 + ROUNDUP(strlen(arch) + 1) + sizeof(descr); - nnote2 = 12 + ROUNDUP(strlen(rpaname) + 1) + sizeof(rpanote); - - n = read(fd, buf, sizeof(buf)); - if (n < 0) { - perror("read"); - exit(1); - } - - if (n < E_HSIZE || memcmp(&buf[E_IDENT+EI_MAGIC], elf_magic, 4) != 0) - goto notelf; - - if (buf[E_IDENT+EI_CLASS] != ELFCLASS32 - || buf[E_IDENT+EI_DATA] != ELFDATA2MSB) { - fprintf(stderr, "%s is not a big-endian 32-bit ELF image\n", - av[1]); - exit(1); - } - - ph = GET_32BE(E_PHOFF); - ps = GET_16BE(E_PHENTSIZE); - np = GET_16BE(E_PHNUM); - if (ph < E_HSIZE || ps < PH_HSIZE || np < 1) - goto notelf; - if (ph + (np + 2) * ps + nnote + nnote2 > n) - goto nospace; - - for (i = 0; i < np; ++i) { - if (GET_32BE(ph + PH_TYPE) == PT_NOTE) { - fprintf(stderr, "%s already has a note entry\n", - av[1]); - exit(0); - } - ph += ps; - } - - /* XXX check that the area we want to use is all zeroes */ - for (i = 0; i < 2 * ps + nnote + nnote2; ++i) - if (buf[ph + i] != 0) - goto nospace; - - /* fill in the program header entry */ - ns = ph + 2 * ps; - PUT_32BE(ph + PH_TYPE, PT_NOTE); - PUT_32BE(ph + PH_OFFSET, ns); - PUT_32BE(ph + PH_FILESZ, nnote); - - /* fill in the note area we point to */ - /* XXX we should probably make this a proper section */ - PUT_32BE(ns, strlen(arch) + 1); - PUT_32BE(ns + 4, N_DESCR * 4); - PUT_32BE(ns + 8, 0x1275); - strcpy((char *) &buf[ns + 12], arch); - ns += 12 + strlen(arch) + 1; - for (i = 0; i < N_DESCR; ++i, ns += 4) - PUT_32BE(ns, descr[i]); - - /* fill in the second program header entry and the RPA note area */ - ph += ps; - PUT_32BE(ph + PH_TYPE, PT_NOTE); - PUT_32BE(ph + PH_OFFSET, ns); - PUT_32BE(ph + PH_FILESZ, nnote2); - - /* fill in the note area we point to */ - PUT_32BE(ns, strlen(rpaname) + 1); - PUT_32BE(ns + 4, sizeof(rpanote)); - PUT_32BE(ns + 8, 0x12759999); - strcpy((char *) &buf[ns + 12], rpaname); - ns += 12 + ROUNDUP(strlen(rpaname) + 1); - for (i = 0; i < N_RPA_DESCR; ++i, ns += 4) - PUT_32BE(ns, rpanote[i]); - - /* Update the number of program headers */ - PUT_16BE(E_PHNUM, np + 2); - - /* write back */ - lseek(fd, (long) 0, SEEK_SET); - i = write(fd, buf, n); - if (i < 0) { - perror("write"); - exit(1); - } - if (i < n) { - fprintf(stderr, "%s: write truncated\n", av[1]); - exit(1); - } - - exit(0); - - notelf: - fprintf(stderr, "%s does not appear to be an ELF file\n", av[1]); - exit(1); - - nospace: - fprintf(stderr, "sorry, I can't find space in %s to put the note\n", - av[1]); - exit(1); -} diff --git a/mkzimage_cmdline.8 b/mkzimage_cmdline.8 deleted file mode 100644 index 31438de..0000000 --- a/mkzimage_cmdline.8 +++ /dev/null @@ -1,20 +0,0 @@ -.\" $Id: mkzimage_cmdline.8 590 2006-02-07 14:38:07Z jplack $ -.TH mkzimage_cmdline 8 -.SH NAME -\fBmkzimage_cmdline\fR - edit the built-in kernel cmdline in a PowerPC CHRP zImage -.SH SYNOPSIS -\fBmkzimage_cmdline [-a 0|1] [-s 'kernel cmdline'] [-c] zImage\fR -.SH DESCRIPTION -\fBmkzimage_cmdline\fR adds a kernel cmdline to a zImage. This string will be passed to the kernel, the contents in /options/boot-file will be overwritten with the provided cmdline. -.SH OPTIONS -.TP -.B \-a 0|1 -activate or deactivate the the cmdline -.TP -.B \-s 'kernel cmdline' -pass this string to the kernel. It can be up to 511 chars long. -.TP -.B \-c -clear cmdline area in zImage -.SH AUTHOR -Olaf Hering diff --git a/mkzimage_cmdline.c b/mkzimage_cmdline.c deleted file mode 100644 index ed27294..0000000 --- a/mkzimage_cmdline.c +++ /dev/null @@ -1,185 +0,0 @@ -/* $Id: mkzimage_cmdline.c 590 2006-02-07 14:38:07Z jplack $ */ -/* - * a little tool to modify the cmdline inside a zImage - * Olaf Hering Copyright (C) 2003, 2004 - */ - -/* - 2003-10-02, version 1 - 2003-11-15, version 2: fix short reads if the string is at the end of the file - 2004-08-07, version 3: use mmap - */ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#define MY_VERSION 3 - -static int activate; -static int clear; -static int set; -static char *string; -static char *filename; - -static const char cmdline_start[] = "cmd_line_start"; -static const char cmdline_end[] = "cmd_line_end"; - -static void my_version(void) -{ - printf("version: %d\n", MY_VERSION); - printf("(C) SuSE Linux AG, Nuernberg, Germany, 2003, 2004\n"); - return; -} - -static void my_rtfm(const char *app) -{ - printf("modify the built-in cmdline of a CHRP boot image\n"); - printf("%s filename\n", app); - printf("work with zImage named 'filename'\n"); - printf(" [-h] display this help\n"); - printf(" [-v] display version\n"); - printf(" [-a 0|1] disable/enable built-in cmdline\n"); - printf(" overrides whatever is passed from OpenFirmware\n"); - printf(" [-s STRING] store STRING in the boot image\n"); - printf(" [-c] clear previous content before update\n"); - printf(" no option will show the current settings in 'filename'\n"); - return; -} - -int main(int argc, char **argv) -{ - struct stat sb; - int fd, found; - unsigned char *p, *s, *e, *tmp, *active; - - if (argc < 2) { - my_rtfm(argv[0]); - exit(1); - } - - while (1) { - int i; - i = getopt(argc, argv, "a:hcvs:"); - if (i == -1) - break; - switch (i) { - case 'a': - if (*optarg == '0') - activate = -1; - else - activate = 1; - break; - case 'c': - clear = 1; - break; - case 'h': - my_rtfm(argv[0]); - exit(0); - case 's': - string = strdup(optarg); - if (!string) { - fprintf(stderr, "set: no mem\n"); - exit(1); - } - set = 1; - if (!activate) - activate = 1; - break; - case 'v': - my_version(); - exit(0); - default: - printf("unknown option\n"); - my_rtfm(argv[0]); - exit(1); - } - } - if (argc <= optind) { - fprintf(stderr, "filename required\n"); - exit(1); - } - filename = strdup(argv[optind]); - if (!filename) { - fprintf(stderr, "no mem\n"); - exit(1); - } - - fd = open(filename, (activate || clear || set) ? O_RDWR : O_RDONLY); - if (fd == -1) - goto error; - found = stat(filename, &sb); - if (found < 0) - goto error; - if (!S_ISREG(sb.st_mode)) { - fprintf(stderr, "%s is not a file\n", filename); - exit(1); - } - - p = mmap(NULL, sb.st_size, - ((activate || clear || set) ? - PROT_WRITE : 0) | PROT_READ, MAP_SHARED, fd, 0); - if (p == MAP_FAILED) - goto error; - s = p; - e = p + sb.st_size - sizeof(cmdline_start) - sizeof(cmdline_end); - found = 0; - while (s < e) { - if (memcmp(++s, cmdline_start, sizeof(cmdline_start) - 1) != 0) - continue; - found = 1; - break; - } - if (!found) - goto no_start; - found = 0; - - active = s - 1; - tmp = s = s + sizeof(cmdline_start) - 1; - e = p + sb.st_size - sizeof(cmdline_end); - while (tmp < e) { - if (memcmp(++tmp, cmdline_end, sizeof(cmdline_end)) != 0) - continue; - found = 1; - break; - } - if (!found) - goto no_end; - - if (activate || clear || set) { - if (activate) - *active = activate > 0 ? '1' : '0'; - if (clear) - memset(s, 0x0, tmp - s); - if (set) - snprintf((char*)s, tmp - s, "%s", string); - } else { - fprintf(stdout, "cmd_line size:%td\n", tmp - s); - fprintf(stdout, "cmd_line: %s\n", s); - fprintf(stdout, "active: %c\n", *active); - } - - munmap(p, sb.st_size); - close(fd); - return 0; - - error: - perror(filename); - return 1; - no_start: - fprintf(stderr, "%s: %s not found.\n", filename, cmdline_start); - return 1; - no_end: - fprintf(stderr, "%s: %s not found.\n", filename, cmdline_end); - return 1; -} diff --git a/python3-libmount.changes b/python3-libmount.changes index 4956a6c..79c8136 100644 --- a/python3-libmount.changes +++ b/python3-libmount.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Sep 27 20:24:45 CEST 2018 - sbrabec@suse.com + +- Drop obsolete downstream ppc utilities + chrp-addnote and mkzimage_cmdline (boo#1109284). +- Drop obsolete setctsid (boo#1109290). + ------------------------------------------------------------------- Mon Aug 6 15:21:35 CEST 2018 - sbrabec@suse.com diff --git a/python3-libmount.spec b/python3-libmount.spec index 9d2be3c..2c95963 100644 --- a/python3-libmount.spec +++ b/python3-libmount.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -143,14 +143,6 @@ Source16: su-l.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 # TODO: split to separate package Source40: klogconsole.tar.xz -# XXX: Run a program in a new session and with controlling tty -Source22: setctsid.c -Source23: setctsid.8 -# XXX: ppc specific, still needed? -Source28: mkzimage_cmdline.8 -Source29: mkzimage_cmdline.c -Source31: addnote.c -# Source41: rfkill-block@.service Source42: rfkill-unblock@.service # @@ -397,8 +389,6 @@ library. %setup -q -n %{_name}-%{version} -b 40 %patch0 -p1 # -# setctsid -cp -p %{S:22} %{S:23} . %build %if %build_util_linux @@ -406,9 +396,6 @@ pushd ../klogconsole # klogconsole build make %{?_smp_mflags} CFLAGS="%{optflags}" CC="%{__cc}" popd -# setctsid build -rm -f setctsid -make %{?_smp_mflags} setctsid CFLAGS="%{optflags}" CC="%{__cc}" # #BEGIN SYSTEMD SAFETY CHECK # With systemd, some utilities are built differently. Keep track of these @@ -576,11 +563,6 @@ AUTOPOINT=true autoreconf -vfi # Safety check: HAVE_UUIDD should be always 1: grep -q 'HAVE_UUIDD 1' config.h make %{?_smp_mflags} -# -%if %build_util_linux -%{__cc} -fwhole-program %{optflags} -o mkzimage_cmdline %{S:29} -%{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31} -%endif %check # mark some tests "known_fail" @@ -680,14 +662,6 @@ ln -s %{_sbindir}/fstrim %{buildroot}/sbin ln -s %{_sbindir}/chcpu %{buildroot}/sbin #EndUsrMerge install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/filesystems -%ifnarch ppc ppc64 -install -m 755 mkzimage_cmdline %{buildroot}%{_bindir} -install -m 644 %{S:28} %{buildroot}%{_mandir}/man8 -install -m 755 chrp-addnote %{buildroot}%{_bindir} -%endif -# setctsid install -install -m 755 setctsid %{buildroot}%{_sbindir} -install -m 444 setctsid.8 %{buildroot}%{_mandir}/man8/ echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > %{buildroot}%{_sbindir}/flushb chmod 755 %{buildroot}%{_sbindir}/flushb # Install scripts to configure raw devices at boot time @@ -1006,10 +980,6 @@ getent passwd uuidd >/dev/null || \ %{_bindir}/uuidgen %{_bindir}/uuidparse %{_bindir}/uname26 -%ifnarch ppc ppc64 -%{_bindir}/chrp-addnote -%{_bindir}/mkzimage_cmdline -%endif %{_bindir}/wdctl %{_sbindir}/addpart %{_sbindir}/agetty @@ -1045,7 +1015,6 @@ getent passwd uuidd >/dev/null || \ %{_sbindir}/rfkill %{_sbindir}/rtcwake %{_sbindir}/runuser -%{_sbindir}/setctsid %{_sbindir}/sulogin %{_sbindir}/swaplabel %{_sbindir}/swapoff @@ -1146,9 +1115,6 @@ getent passwd uuidd >/dev/null || \ %{_mandir}/man8/readprofile.8.gz %{_mandir}/man8/rfkill.8.gz %{_mandir}/man8/chcpu.8.gz -%ifnarch ppc ppc64 -%{_mandir}/man8/mkzimage_cmdline.8.gz -%endif %{_mandir}/man8/partx.8.gz %{_mandir}/man8/pivot_root.8.gz %{_mandir}/man8/raw.8.gz @@ -1158,7 +1124,6 @@ getent passwd uuidd >/dev/null || \ %{_mandir}/man8/swapon.8.gz %{_mandir}/man8/umount.8.gz %{_mandir}/man8/uname26.8.gz -%{_mandir}/man8/setctsid.8.gz %{_mandir}/man8/wipefs.8.gz %{_mandir}/man8/zramctl.8.gz %{_mandir}/man8/fstrim.8.gz diff --git a/setctsid.8 b/setctsid.8 deleted file mode 100644 index da66ed3..0000000 --- a/setctsid.8 +++ /dev/null @@ -1,25 +0,0 @@ -.\" Rick Sladkey -.\" In the public domain. -.\" Path modifications by faith@cs.unc.edu -.TH SETCTSID 8 "12 April 1999" "Linux 2.2" "Linux Programmer's Manual" -.SH NAME -setctsid \- run a program in a new session and tty -.SH SYNOPSIS -.B setctsid -.RB [ -f ] -.I /dev/ -.I program -.RB [ args... ] -.SH DESCRIPTION -.B setctsid -runs a program in a new session with a new controlling terminal -.IR /dev/ . -The -.B -f -option causes -.B setctsid -to run the program in a new process. -.SH "SEE ALSO" -.BR setsid (2) -.SH AUTHORS -Rick Sladkey , Werner Fink diff --git a/setctsid.c b/setctsid.c deleted file mode 100644 index d5eb704..0000000 --- a/setctsid.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * setctsid.c -- execute a command in a new session and with - * new controlling terminal - * - * derviated from: setctsid.c of Rick Sladkey - * In the public domain. - * - * Changed by Werner Fink, - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define xerror(n) do { int error = errno; \ - if (!isatty(fileno(stderr))) \ - syslog(LOG_ERR, n ": %s", strerror(error)); \ - else \ - errno = error, perror(n); \ - } while (0) - -int main(int argc, char *argv[]) -{ - int fd; - struct stat buf; - int dofork = 0; - - if (argc > 1 && !strcmp(argv[1], "-f")) { - dofork = 1; - argc--; - argv++; - } - if (argc < 3) { - fprintf(stderr, "usage: setctsid [-f] tty program [arg ...]\n"); - exit(1); - } - if (stat(argv[1], &buf) < 0) { - perror(argv[1]); - exit(1); - } - if (!(S_ISCHR(buf.st_mode))) { - /* why do we care? */ - fprintf(stderr, "%s: not a character device\n", argv[1]); - exit(1); - } - if (dofork) { - switch (fork()) { - case -1: - perror("fork"); - exit(1); - case 0: - break; - default: - exit(0); - } - } - if (setsid() < 0) { - perror("setsid"); - exit(1); - } - if ((fd = open(argv[1], O_RDWR, 0)) < 0) { - xerror("open"); - exit(1); - } - dup2(fd, fileno(stdin)); - dup2(fd, fileno(stdout)); - dup2(fd, fileno(stderr)); - - if (isatty(fd)) { - if (ioctl(fileno(stdin), TIOCSCTTY, argv[1]) < 0) { - xerror("ioctl"); - exit(1); - } - } - - if (fd > fileno(stderr)) - close(fd); - - execvp(argv[2], argv + 2); - xerror("execvp"); - exit(1); -} diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 4956a6c..79c8136 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Sep 27 20:24:45 CEST 2018 - sbrabec@suse.com + +- Drop obsolete downstream ppc utilities + chrp-addnote and mkzimage_cmdline (boo#1109284). +- Drop obsolete setctsid (boo#1109290). + ------------------------------------------------------------------- Mon Aug 6 15:21:35 CEST 2018 - sbrabec@suse.com diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index e6ef424..e66fdf1 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -143,14 +143,6 @@ Source16: su-l.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 # TODO: split to separate package Source40: klogconsole.tar.xz -# XXX: Run a program in a new session and with controlling tty -Source22: setctsid.c -Source23: setctsid.8 -# XXX: ppc specific, still needed? -Source28: mkzimage_cmdline.8 -Source29: mkzimage_cmdline.c -Source31: addnote.c -# Source41: rfkill-block@.service Source42: rfkill-unblock@.service # @@ -397,8 +389,6 @@ library. %setup -q -n %{_name}-%{version} -b 40 %patch0 -p1 # -# setctsid -cp -p %{S:22} %{S:23} . %build %if %build_util_linux @@ -406,9 +396,6 @@ pushd ../klogconsole # klogconsole build make %{?_smp_mflags} CFLAGS="%{optflags}" CC="%{__cc}" popd -# setctsid build -rm -f setctsid -make %{?_smp_mflags} setctsid CFLAGS="%{optflags}" CC="%{__cc}" # #BEGIN SYSTEMD SAFETY CHECK # With systemd, some utilities are built differently. Keep track of these @@ -576,11 +563,6 @@ AUTOPOINT=true autoreconf -vfi # Safety check: HAVE_UUIDD should be always 1: grep -q 'HAVE_UUIDD 1' config.h make %{?_smp_mflags} -# -%if %build_util_linux -%{__cc} -fwhole-program %{optflags} -o mkzimage_cmdline %{S:29} -%{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31} -%endif %check # mark some tests "known_fail" @@ -680,14 +662,6 @@ ln -s %{_sbindir}/fstrim %{buildroot}/sbin ln -s %{_sbindir}/chcpu %{buildroot}/sbin #EndUsrMerge install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/filesystems -%ifnarch ppc ppc64 -install -m 755 mkzimage_cmdline %{buildroot}%{_bindir} -install -m 644 %{S:28} %{buildroot}%{_mandir}/man8 -install -m 755 chrp-addnote %{buildroot}%{_bindir} -%endif -# setctsid install -install -m 755 setctsid %{buildroot}%{_sbindir} -install -m 444 setctsid.8 %{buildroot}%{_mandir}/man8/ echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > %{buildroot}%{_sbindir}/flushb chmod 755 %{buildroot}%{_sbindir}/flushb # Install scripts to configure raw devices at boot time @@ -1006,10 +980,6 @@ getent passwd uuidd >/dev/null || \ %{_bindir}/uuidgen %{_bindir}/uuidparse %{_bindir}/uname26 -%ifnarch ppc ppc64 -%{_bindir}/chrp-addnote -%{_bindir}/mkzimage_cmdline -%endif %{_bindir}/wdctl %{_sbindir}/addpart %{_sbindir}/agetty @@ -1045,7 +1015,6 @@ getent passwd uuidd >/dev/null || \ %{_sbindir}/rfkill %{_sbindir}/rtcwake %{_sbindir}/runuser -%{_sbindir}/setctsid %{_sbindir}/sulogin %{_sbindir}/swaplabel %{_sbindir}/swapoff @@ -1146,9 +1115,6 @@ getent passwd uuidd >/dev/null || \ %{_mandir}/man8/readprofile.8.gz %{_mandir}/man8/rfkill.8.gz %{_mandir}/man8/chcpu.8.gz -%ifnarch ppc ppc64 -%{_mandir}/man8/mkzimage_cmdline.8.gz -%endif %{_mandir}/man8/partx.8.gz %{_mandir}/man8/pivot_root.8.gz %{_mandir}/man8/raw.8.gz @@ -1158,7 +1124,6 @@ getent passwd uuidd >/dev/null || \ %{_mandir}/man8/swapon.8.gz %{_mandir}/man8/umount.8.gz %{_mandir}/man8/uname26.8.gz -%{_mandir}/man8/setctsid.8.gz %{_mandir}/man8/wipefs.8.gz %{_mandir}/man8/zramctl.8.gz %{_mandir}/man8/fstrim.8.gz diff --git a/util-linux.changes b/util-linux.changes index 4956a6c..79c8136 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Sep 27 20:24:45 CEST 2018 - sbrabec@suse.com + +- Drop obsolete downstream ppc utilities + chrp-addnote and mkzimage_cmdline (boo#1109284). +- Drop obsolete setctsid (boo#1109290). + ------------------------------------------------------------------- Mon Aug 6 15:21:35 CEST 2018 - sbrabec@suse.com diff --git a/util-linux.spec b/util-linux.spec index 44e9c2f..ab1ca18 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -143,14 +143,6 @@ Source16: su-l.pamd # klogconsole, http://opensuse.github.com/kiwi, 7.02.25, git 859dc050 # TODO: split to separate package Source40: klogconsole.tar.xz -# XXX: Run a program in a new session and with controlling tty -Source22: setctsid.c -Source23: setctsid.8 -# XXX: ppc specific, still needed? -Source28: mkzimage_cmdline.8 -Source29: mkzimage_cmdline.c -Source31: addnote.c -# Source41: rfkill-block@.service Source42: rfkill-unblock@.service # @@ -397,8 +389,6 @@ library. %setup -q -n %{_name}-%{version} -b 40 %patch0 -p1 # -# setctsid -cp -p %{S:22} %{S:23} . %build %if %build_util_linux @@ -406,9 +396,6 @@ pushd ../klogconsole # klogconsole build make %{?_smp_mflags} CFLAGS="%{optflags}" CC="%{__cc}" popd -# setctsid build -rm -f setctsid -make %{?_smp_mflags} setctsid CFLAGS="%{optflags}" CC="%{__cc}" # #BEGIN SYSTEMD SAFETY CHECK # With systemd, some utilities are built differently. Keep track of these @@ -576,11 +563,6 @@ AUTOPOINT=true autoreconf -vfi # Safety check: HAVE_UUIDD should be always 1: grep -q 'HAVE_UUIDD 1' config.h make %{?_smp_mflags} -# -%if %build_util_linux -%{__cc} -fwhole-program %{optflags} -o mkzimage_cmdline %{S:29} -%{__cc} -fwhole-program %{optflags} -o chrp-addnote %{SOURCE31} -%endif %check # mark some tests "known_fail" @@ -680,14 +662,6 @@ ln -s %{_sbindir}/fstrim %{buildroot}/sbin ln -s %{_sbindir}/chcpu %{buildroot}/sbin #EndUsrMerge install -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/filesystems -%ifnarch ppc ppc64 -install -m 755 mkzimage_cmdline %{buildroot}%{_bindir} -install -m 644 %{S:28} %{buildroot}%{_mandir}/man8 -install -m 755 chrp-addnote %{buildroot}%{_bindir} -%endif -# setctsid install -install -m 755 setctsid %{buildroot}%{_sbindir} -install -m 444 setctsid.8 %{buildroot}%{_mandir}/man8/ echo -e "#! /bin/bash\n/sbin/blockdev --flushbufs \$1" > %{buildroot}%{_sbindir}/flushb chmod 755 %{buildroot}%{_sbindir}/flushb # Install scripts to configure raw devices at boot time @@ -1006,10 +980,6 @@ getent passwd uuidd >/dev/null || \ %{_bindir}/uuidgen %{_bindir}/uuidparse %{_bindir}/uname26 -%ifnarch ppc ppc64 -%{_bindir}/chrp-addnote -%{_bindir}/mkzimage_cmdline -%endif %{_bindir}/wdctl %{_sbindir}/addpart %{_sbindir}/agetty @@ -1045,7 +1015,6 @@ getent passwd uuidd >/dev/null || \ %{_sbindir}/rfkill %{_sbindir}/rtcwake %{_sbindir}/runuser -%{_sbindir}/setctsid %{_sbindir}/sulogin %{_sbindir}/swaplabel %{_sbindir}/swapoff @@ -1146,9 +1115,6 @@ getent passwd uuidd >/dev/null || \ %{_mandir}/man8/readprofile.8.gz %{_mandir}/man8/rfkill.8.gz %{_mandir}/man8/chcpu.8.gz -%ifnarch ppc ppc64 -%{_mandir}/man8/mkzimage_cmdline.8.gz -%endif %{_mandir}/man8/partx.8.gz %{_mandir}/man8/pivot_root.8.gz %{_mandir}/man8/raw.8.gz @@ -1158,7 +1124,6 @@ getent passwd uuidd >/dev/null || \ %{_mandir}/man8/swapon.8.gz %{_mandir}/man8/umount.8.gz %{_mandir}/man8/uname26.8.gz -%{_mandir}/man8/setctsid.8.gz %{_mandir}/man8/wipefs.8.gz %{_mandir}/man8/zramctl.8.gz %{_mandir}/man8/fstrim.8.gz From 7de341a83d0065812d2997032334f43a40e374ae7f84a29fce8477e4f53f6d6c Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 15 Oct 2018 15:41:28 +0000 Subject: [PATCH 2/3] Accepting request 641677 from home:sbrabec:branches:Base:System - Create empty /etc/issue.d for the new agetty feature. OBS-URL: https://build.opensuse.org/request/show/641677 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=381 --- python3-libmount.changes | 5 +++++ python3-libmount.spec | 3 ++- util-linux-systemd.changes | 5 +++++ util-linux-systemd.spec | 3 ++- util-linux.changes | 5 +++++ util-linux.spec | 3 ++- 6 files changed, 21 insertions(+), 3 deletions(-) diff --git a/python3-libmount.changes b/python3-libmount.changes index 79c8136..3cd9d53 100644 --- a/python3-libmount.changes +++ b/python3-libmount.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 12 14:06:56 CEST 2018 - sbrabec@suse.com + +- Create empty /etc/issue.d for the new agetty feature. + ------------------------------------------------------------------- Thu Sep 27 20:24:45 CEST 2018 - sbrabec@suse.com diff --git a/python3-libmount.spec b/python3-libmount.spec index 2c95963..d0b6b20 100644 --- a/python3-libmount.spec +++ b/python3-libmount.spec @@ -600,7 +600,7 @@ exit "$result" %install %if %build_util_linux -mkdir -p %{buildroot}{%{_sysconfdir}/{pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} +mkdir -p %{buildroot}{%{_sysconfdir}/{pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir},%{_sysconfdir}/issue.d} install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote @@ -886,6 +886,7 @@ getent passwd uuidd >/dev/null || \ %config(noreplace) %{_sysconfdir}/pam.d/su %config(noreplace) %{_sysconfdir}/pam.d/su-l %config(noreplace) %{_sysconfdir}/default/su +%config %dir %{_sysconfdir}/issue.d #UsrMerge /bin/kill /bin/su diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 79c8136..3cd9d53 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 12 14:06:56 CEST 2018 - sbrabec@suse.com + +- Create empty /etc/issue.d for the new agetty feature. + ------------------------------------------------------------------- Thu Sep 27 20:24:45 CEST 2018 - sbrabec@suse.com diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index e66fdf1..888fefd 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -600,7 +600,7 @@ exit "$result" %install %if %build_util_linux -mkdir -p %{buildroot}{%{_sysconfdir}/{pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} +mkdir -p %{buildroot}{%{_sysconfdir}/{pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir},%{_sysconfdir}/issue.d} install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote @@ -886,6 +886,7 @@ getent passwd uuidd >/dev/null || \ %config(noreplace) %{_sysconfdir}/pam.d/su %config(noreplace) %{_sysconfdir}/pam.d/su-l %config(noreplace) %{_sysconfdir}/default/su +%config %dir %{_sysconfdir}/issue.d #UsrMerge /bin/kill /bin/su diff --git a/util-linux.changes b/util-linux.changes index 79c8136..3cd9d53 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 12 14:06:56 CEST 2018 - sbrabec@suse.com + +- Create empty /etc/issue.d for the new agetty feature. + ------------------------------------------------------------------- Thu Sep 27 20:24:45 CEST 2018 - sbrabec@suse.com diff --git a/util-linux.spec b/util-linux.spec index ab1ca18..12b2153 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -600,7 +600,7 @@ exit "$result" %install %if %build_util_linux -mkdir -p %{buildroot}{%{_sysconfdir}/{pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir}} +mkdir -p %{buildroot}{%{_sysconfdir}/{pam.d,default},%{_mandir}/man{1,8},/bin,/sbin,%{_bindir},%{_sbindir},%{_infodir},%{_sysconfdir}/issue.d} install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/blkid.conf install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/pam.d/login install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/pam.d/remote @@ -886,6 +886,7 @@ getent passwd uuidd >/dev/null || \ %config(noreplace) %{_sysconfdir}/pam.d/su %config(noreplace) %{_sysconfdir}/pam.d/su-l %config(noreplace) %{_sysconfdir}/default/su +%config %dir %{_sysconfdir}/issue.d #UsrMerge /bin/kill /bin/su From 4278302324d00f9115e4d65a681c443b5daaaaf3a98f5b61719073ba91f4520b Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 7 Nov 2018 07:46:39 +0000 Subject: [PATCH 3/3] Accepting request 644909 from home:sbrabec:branches:numlock-b1113188 - Fix runstatedir path (to /run) (boo#1113188#c1). OBS-URL: https://build.opensuse.org/request/show/644909 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=382 --- python3-libmount.changes | 5 +++++ python3-libmount.spec | 8 +++++--- util-linux-systemd.changes | 5 +++++ util-linux-systemd.spec | 8 +++++--- util-linux.changes | 5 +++++ util-linux.spec | 8 +++++--- 6 files changed, 30 insertions(+), 9 deletions(-) diff --git a/python3-libmount.changes b/python3-libmount.changes index 3cd9d53..cd0156f 100644 --- a/python3-libmount.changes +++ b/python3-libmount.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 26 17:24:46 CEST 2018 - sbrabec@suse.com + +- Fix runstatedir path (to /run) (boo#1113188#c1). + ------------------------------------------------------------------- Fri Oct 12 14:06:56 CEST 2018 - sbrabec@suse.com diff --git a/python3-libmount.spec b/python3-libmount.spec index d0b6b20..9a10962 100644 --- a/python3-libmount.spec +++ b/python3-libmount.spec @@ -507,15 +507,12 @@ export SUID_LDFLAGS="-pie" export LDFLAGS="-Wl,-z,relro,-z,now" export CFLAGS="%{optflags} -D_GNU_SOURCE" export CXXFLAGS="%{optflags} -D_GNU_SOURCE" -# override default localstatedir to /run -# only used for volatile data # # SUSE now supports only systemd based system. We do not build # sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities. AUTOPOINT=true autoreconf -vfi %configure \ --disable-silent-rules \ - --localstatedir=/run \ --docdir=%{_docdir}/%{_name} \ --disable-makeinstall-chown \ --disable-makeinstall-setuid \ @@ -844,6 +841,11 @@ getent passwd uuidd >/dev/null || \ %{service_add_pre uuidd.socket uuidd.service} %post -n uuidd +# Fix running instance paths during live upgrade from +# Leap = 15, SLE = 15 (boo#1113188). +# Useful for Tumbleweed or zypper dup only. +mv /run/run/uuidd /run/uuidd >/dev/null 2>&1 || : +rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %{service_add_post uuidd.socket uuidd.service} %preun -n uuidd diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index 3cd9d53..cd0156f 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 26 17:24:46 CEST 2018 - sbrabec@suse.com + +- Fix runstatedir path (to /run) (boo#1113188#c1). + ------------------------------------------------------------------- Fri Oct 12 14:06:56 CEST 2018 - sbrabec@suse.com diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 888fefd..af1d93a 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -507,15 +507,12 @@ export SUID_LDFLAGS="-pie" export LDFLAGS="-Wl,-z,relro,-z,now" export CFLAGS="%{optflags} -D_GNU_SOURCE" export CXXFLAGS="%{optflags} -D_GNU_SOURCE" -# override default localstatedir to /run -# only used for volatile data # # SUSE now supports only systemd based system. We do not build # sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities. AUTOPOINT=true autoreconf -vfi %configure \ --disable-silent-rules \ - --localstatedir=/run \ --docdir=%{_docdir}/%{_name} \ --disable-makeinstall-chown \ --disable-makeinstall-setuid \ @@ -844,6 +841,11 @@ getent passwd uuidd >/dev/null || \ %{service_add_pre uuidd.socket uuidd.service} %post -n uuidd +# Fix running instance paths during live upgrade from +# Leap = 15, SLE = 15 (boo#1113188). +# Useful for Tumbleweed or zypper dup only. +mv /run/run/uuidd /run/uuidd >/dev/null 2>&1 || : +rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %{service_add_post uuidd.socket uuidd.service} %preun -n uuidd diff --git a/util-linux.changes b/util-linux.changes index 3cd9d53..cd0156f 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 26 17:24:46 CEST 2018 - sbrabec@suse.com + +- Fix runstatedir path (to /run) (boo#1113188#c1). + ------------------------------------------------------------------- Fri Oct 12 14:06:56 CEST 2018 - sbrabec@suse.com diff --git a/util-linux.spec b/util-linux.spec index 12b2153..2bf581d 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -507,15 +507,12 @@ export SUID_LDFLAGS="-pie" export LDFLAGS="-Wl,-z,relro,-z,now" export CFLAGS="%{optflags} -D_GNU_SOURCE" export CXXFLAGS="%{optflags} -D_GNU_SOURCE" -# override default localstatedir to /run -# only used for volatile data # # SUSE now supports only systemd based system. We do not build # sysvinit-only versions of UTIL_LINUX_SYSTEMD_SOURCES utilities. AUTOPOINT=true autoreconf -vfi %configure \ --disable-silent-rules \ - --localstatedir=/run \ --docdir=%{_docdir}/%{_name} \ --disable-makeinstall-chown \ --disable-makeinstall-setuid \ @@ -844,6 +841,11 @@ getent passwd uuidd >/dev/null || \ %{service_add_pre uuidd.socket uuidd.service} %post -n uuidd +# Fix running instance paths during live upgrade from +# Leap = 15, SLE = 15 (boo#1113188). +# Useful for Tumbleweed or zypper dup only. +mv /run/run/uuidd /run/uuidd >/dev/null 2>&1 || : +rmdir --ignore-fail-on-non-empty /run/run >/dev/null 2>&1 || : %{service_add_post uuidd.socket uuidd.service} %preun -n uuidd