Hello community, here is the log from the commit of package prctl for openSUSE:Factory checked in at Sat Nov 20 12:33:49 CET 2010. -------- --- prctl/prctl.changes 2006-01-25 21:40:37.000000000 +0100 +++ /mounts/work_src_done/STABLE/prctl/prctl.changes 2010-11-19 10:34:46.000000000 +0100 @@ -1,0 +2,8 @@ +Fri Nov 19 09:17:32 UTC 2010 - mvyskocil@suse.cz + +- Update to 1.5 (bugfix release) + * Better error message in case kernel does not support prctl operations. +- refresh SUSE patches +- add Changelog and COPYING to docdir + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- prctl-1.3.dif prctl-1.3.tar.gz warn.patch New: ---- prctl-1.5-Makefile.patch prctl-1.5-warnings.patch prctl-1.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ prctl.spec ++++++ --- /var/tmp/diff_new_pack.R4SyoL/_old 2010-11-20 12:33:40.000000000 +0100 +++ /var/tmp/diff_new_pack.R4SyoL/_new 2010-11-20 12:33:40.000000000 +0100 @@ -1,7 +1,7 @@ # -# spec file for package prctl (Version 1.3) +# spec file for package prctl (Version 1.5) # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,45 +20,41 @@ Name: prctl Summary: A utility to perform process operations -Version: 1.3 -Release: 488 +Version: 1.5 +Release: 1 Group: System/Monitoring -License: GPL v2 or later -Source: ftp://ftp.hp.com/pub/linux/prctl/prctl-%{version}.tar.gz -Patch: prctl-%{version}.dif -Patch1: warn.patch +License: GPLv2+ +Url: http://sourceforge.net/projects/prctl +Source0: prctl-%{version}.tar.gz +Patch0: prctl-1.5-Makefile.patch +Patch1: prctl-1.5-warnings.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: licenses +Requires: licenses %description The prctl utility allows a user to control certain process behaviors in the runtime environment. - - -Authors: --------- - Khalid Aziz <khalid_aziz@hp.com> - %prep -%setup -%patch -%patch1 +%setup -q +%patch0 -p1 -b .makefile +%patch1 -p0 -b .warnings %build -CFLAGS=$RPM_OPT_FLAGS \ - ./configure --prefix=/usr --infodir=%{_infodir} --mandir=%{_mandir} -make +%{configure} %install -make install prefix=$RPM_BUILD_ROOT/usr infodir=$RPM_BUILD_ROOT%{_infodir} \ - mandir=$RPM_BUILD_ROOT%{_mandir} +%{makeinstall} +%{__ln_s} -f %{_datadir}/doc/licenses/GPL-2.0.txt COPYING %clean -rm -fr $RPM_BUILD_ROOT +%{__rm} -rf %{buildroot} %files %defattr(-, root, root) -/usr/bin/prctl -%doc %{_mandir}/man1/prctl.1.gz +%doc COPYING ChangeLog +%{_bindir}/%{name} +%doc %{_mandir}/man1/%{name}.1.* %changelog ++++++ prctl-1.5-Makefile.patch ++++++ --- Makefile.in | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) Index: prctl-1.5/Makefile.in =================================================================== --- prctl-1.5.orig/Makefile.in 2006-05-18 17:51:16.000000000 +0200 +++ prctl-1.5/Makefile.in 2010-11-19 10:14:09.785941511 +0100 @@ -30,26 +30,27 @@ LIBS = @LIBS@ CFLAGS = @CFLAGS@ # If you want debug on by default, use: CFLAGS="-g" ./configure -LDFLAGS = $(CFLAGS) +LDFLAGS = @LDFLAGS@ prefix = @prefix@ -exec_prefix = $(prefix) +exec_prefix = @exec_prefix@ -bindir = $(exec_prefix)/bin +bindir = @bindir@ scriptdir = $(bindir) # scriptdir is the directory in which shell scripts should be installed -#datadir = $(prefix)/lib -#libdir = $(prefix)/lib -#infodir = $(prefix)/info +datadir = @datadir@ +libdir = @libdir@ +infodir = @infodir@ # Extension (not including `.') for the installed manual page filenames. manext = 1 # Where to install the manual pages. -mandir = $(prefix)/share/man/man$(manext) +mandir = @mandir@ +man1dir = $(mandir)/man$(manext) # Use manlinks=so to use the .so method instead of hard links manlinks = ln -alldirs = $(bindir) $(scriptdir) $(datadir) $(libdir) $(infodir) $(mandir) +alldirs = $(bindir) $(scriptdir) $(datadir) $(libdir) $(infodir) $(man1dir) #### End of system configuration section. #### @@ -74,25 +75,25 @@ install: installdirs installbin installman installdirs: - -if test ! -d $(prefix)/share; then \ - mkdir -p $(prefix)/share; fi - -if test ! -d $(prefix)/share/man; then \ - mkdir -p $(prefix)/share/man; fi - -for dir in $(alldirs) ; do \ - if test ! -d $${dir}; then \ - mkdir -p $${dir}; fi; \ + -if test ! -d "$(DESTDIR)/$(mandir)"; then \ + mkdir -p "$(DESTDIR)/$(mandir)"; fi + -if test ! -d "$(DESTDIR)/$(datadir)"; then \ + mkdir -p "$(DESTDIR)/$(datadir)"; fi + -for dir in $(alldirs); do \ + if test ! -d $(DESTDIR)/$${dir}; then \ + mkdir -p $(DESTDIR)/$${dir}; fi; \ done installbin: all - $(INSTALL_PROGRAM) prctl $(bindir)/prctl + $(INSTALL_PROGRAM) prctl $(DESTDIR)/$(bindir)/prctl installman: prctl.1 - rm -f $(mandir)/prctl.$(manext) - $(INSTALL_DATA) prctl.1 $(mandir)/prctl.$(manext) + rm -f $(DESTDIR)/$(man1dir)/prctl.$(manext) + $(INSTALL_DATA) prctl.1 $(DESTDIR)/$(man1dir)/prctl.$(manext) uninstall: - rm -f $(bindir)/prctl - rm -f $(mandir)/prctl.$(manext) + rm -f $(DESTDIR)/$(bindir)/prctl + rm -f $(DESTDIR)/$(man1dir)/prctl.$(manext) Makefile: Makefile.in ./config.status ./config.status ++++++ prctl-1.5-warnings.patch ++++++ Index: prctl.c =================================================================== --- prctl.c.orig 2006-05-25 00:06:24.000000000 +0200 +++ prctl.c 2010-11-19 10:03:03.821629772 +0100 @@ -48,12 +48,12 @@ /* Verbose mode */ int verbose=0; -print_version(char *progname) +void print_version(char *progname) { printf("%s version %s\n", progname, VERSION); } -usage(char *progname) +void usage(char *progname) { print_version(progname); printf("Usage: %s [-v] [-h|--help] [--version]\n", progname); @@ -374,4 +374,5 @@ exit(1); } } + abort(); } ++++++ prctl-1.3.tar.gz -> prctl-1.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prctl-1.3/ChangeLog new/prctl-1.5/ChangeLog --- old/prctl-1.3/ChangeLog 2001-10-19 21:54:10.000000000 +0200 +++ new/prctl-1.5/ChangeLog 2006-05-18 18:47:12.000000000 +0200 @@ -1,3 +1,11 @@ +Thu May 18 10:46:10 MDT 2006 Khalid Aziz (khalid_aziz@hp.com) + * Updated man page location in Makefile.in + * Better error message in case kernel does not support prctl + operations. + +Wed Mar 5 11:49:58 MST 2003 Khalid Aziz (khalid_aziz@hp.com) + * Added "always-signal" option to --unaligned for ia64. + Wed Oct 17 16:11:59 MDT 2001 Khalid Aziz (khalid_aziz@hp.com) * Added option to set floating point emulation behavior. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prctl-1.3/Makefile.in new/prctl-1.5/Makefile.in --- old/prctl-1.3/Makefile.in 2001-10-18 00:32:17.000000000 +0200 +++ new/prctl-1.5/Makefile.in 2006-05-18 17:51:16.000000000 +0200 @@ -38,14 +38,14 @@ bindir = $(exec_prefix)/bin scriptdir = $(bindir) # scriptdir is the directory in which shell scripts should be installed -datadir = $(prefix)/lib -libdir = $(prefix)/lib -infodir = $(prefix)/info +#datadir = $(prefix)/lib +#libdir = $(prefix)/lib +#infodir = $(prefix)/info # Extension (not including `.') for the installed manual page filenames. manext = 1 # Where to install the manual pages. -mandir = $(prefix)/man/man$(manext) +mandir = $(prefix)/share/man/man$(manext) # Use manlinks=so to use the .so method instead of hard links manlinks = ln @@ -74,11 +74,13 @@ install: installdirs installbin installman installdirs: - -if test ! -d $(prefix)/man; then \ - mkdir $(prefix)/man; fi + -if test ! -d $(prefix)/share; then \ + mkdir -p $(prefix)/share; fi + -if test ! -d $(prefix)/share/man; then \ + mkdir -p $(prefix)/share/man; fi -for dir in $(alldirs) ; do \ if test ! -d $${dir}; then \ - mkdir $${dir}; fi; \ + mkdir -p $${dir}; fi; \ done installbin: all diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prctl-1.3/prctl.1 new/prctl-1.5/prctl.1 --- old/prctl-1.3/prctl.1 2001-10-20 00:25:10.000000000 +0200 +++ new/prctl-1.5/prctl.1 2003-03-05 20:04:00.000000000 +0100 @@ -14,7 +14,7 @@ .P where \fB<options>\fP are: .P -.RB "\|" --unaligned=[silent|signal|default] "\|" +.RB "\|" --unaligned=[silent|signal|always-signal|default] "\|" .P .RB "\|" --fpemu=[silent|signal|default] "\|" .SH DESCRIPTION @@ -64,11 +64,16 @@ Query the current settings for the process options controllable by prctl. .TP -\fI--unaligned=[silent|signal|default]]\fP +\fI--unaligned=[silent|signal|always-signal|default]]\fP Set unaligned memory access behavior to not log the access (\fBsilent\fP), send SIGBUS to the process (\fBsignal\fP), or -do the default (\fBdefault\fP). If a value is not specified after "=", -current setting is returned. +do the default (\fBdefault\fP). On IA-64 architecture an additional +value \fBalways-signal\fP is supported which causes a SIGBUS to be +generated every time an unaligned access occurs. Refer to the section +titled "Memory Datum Alignment and Atomicity" in "Intel IA-64 Architecture +Software Developer's Manual: Volume 2" for details on when an unaligned +access would not generate signal normally. If a value is not specified +after "=", current setting is returned. .TP \fI--fpemu=[silent|signal|default]]\fP @@ -108,7 +113,7 @@ known as IA-64) and is supported on kernels 2.4.11 and above. Other architectures and kernels may return "Invalid argument" error. -.nH SEE ALSO +.SH SEE ALSO .BR prctl(2) .SH AUTHOR Khalid Aziz <khalid_aziz@hp.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prctl-1.3/prctl.c new/prctl-1.5/prctl.c --- old/prctl-1.3/prctl.c 2001-10-19 21:53:35.000000000 +0200 +++ new/prctl-1.5/prctl.c 2006-05-25 00:06:24.000000000 +0200 @@ -29,11 +29,12 @@ #include <string.h> /* Version */ -#define VERSION "1.3" +#define VERSION "1.5" /* Shell to fall back on if no other shell can be found */ #define DEFAULT_SHELL "/bin/bash" +#define PSR_UC 0x08 /* Command line options */ struct option longopts[] = { @@ -58,13 +59,18 @@ printf("Usage: %s [-v] [-h|--help] [--version]\n", progname); printf(" <-q|<options>> [command]\n"); printf(" Options:\n"); +#ifdef __ia64__ + printf(" --unaligned=[silent|signal|always-signal|default]\n"); +#else printf(" --unaligned=[silent|signal|default]\n"); +#endif printf(" --fpemu=[silent|signal|default]\n"); } int set_unaligned(int prctl_val) { int alignval, retval; + int umask; /* * Check if we need to display the value or set it. @@ -82,6 +88,12 @@ break; case PR_UNALIGN_SIGBUS: +#ifdef __ia64__ + /* Get user mask */ + __asm__ __volatile__ ("mov %0=psr.um;;": "=r"(umask) :: "memory"); + if (umask & PSR_UC) + printf("always-"); +#endif printf("signal\n"); break; } @@ -107,8 +119,11 @@ } } if (retval == -1) { - fprintf(stderr, "Failed to %s \"unalign\" value: %s\n", - ((prctl_val == -1)?"get":"set"), strerror(errno)); + if (errno == EINVAL) + fprintf(stderr, "ERROR: Kernel on this platform may not implement this prctl feature.\n"); + else + fprintf(stderr, "Failed to %s \"unalign\" value: %s\n", + ((prctl_val==-1)?"get":"set"),strerror(errno)); } return(retval); } @@ -161,15 +176,14 @@ /* * If this was a PR_GET_FPEMU operation and the error is EINVAL, * this platform does not implement PR_GET_FPEMU (It may be - * implemented only on IA64 platforms). Do not complain in that - * case. + * implemented only on IA64 platforms). */ - if ((retval == -1) && ((prctl_val != -1) || (errno != EINVAL))) { - fprintf(stderr, "Failed to %s \"fpemu\" value: %s\n", - ((prctl_val == -1)?"get":"set"), strerror(errno)); - if ((prctl_val != -1) && (errno ==EINVAL)) { - fprintf(stderr, " Kernel on this platform may not implement the PR_SET_FPEMU feature.\n"); - } + if (retval == -1) { + if (errno == EINVAL) + fprintf(stderr, "ERROR: Kernel on this platform may not implement this prctl feature.\n"); + else + fprintf(stderr, "Failed to %s \"fpemu\" value: %s\n", + ((prctl_val==-1)?"get":"set"),strerror(errno)); } return(retval); } @@ -181,8 +195,10 @@ char shellname[128]; int unaligned_val=-99; int fpemu_val=-99; + int always_signal=0; int display = 0; int display_all = 0; + int umask; strcpy(fullpath, argv[0]); if ((progname = strrchr(fullpath, '/')) != NULL) { @@ -207,6 +223,11 @@ unaligned_val = PR_UNALIGN_NOPRINT; } else if (strcmp(optarg, "signal") == 0) { unaligned_val = PR_UNALIGN_SIGBUS; +#ifdef __ia64__ + } else if (strcmp(optarg, "always-signal") == 0) { + unaligned_val = PR_UNALIGN_SIGBUS; + always_signal = 1; +#endif } else if (strcmp(optarg, "default") == 0) { unaligned_val = 0; } else if (optarg[0] == 0) { @@ -287,6 +308,12 @@ if (set_unaligned(unaligned_val) == -1) { exit(1); } +#ifdef __ia64__ + if (always_signal) { + /* Set alignment check in user mask */ + __asm__ __volatile__ ("sum psr.ac;;"::: "memory"); + } +#endif } if (fpemu_val != -99) { if (set_fpemu(fpemu_val) == -1) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/prctl-1.3/prctl.spec new/prctl-1.5/prctl.spec --- old/prctl-1.3/prctl.spec 2001-10-19 21:53:39.000000000 +0200 +++ new/prctl-1.5/prctl.spec 2006-05-18 19:01:06.000000000 +0200 @@ -1,4 +1,4 @@ -%define version 1.3 +%define version 1.5 Summary: Utility to perform process operations Name: prctl @@ -39,6 +39,13 @@ /usr/local/man/man1/prctl.1 %changelog +* Thu May 18 2006 Khalid Aziz (khalid_aziz@hp.com) +- Updated man page location in Makefile.in +- Better error message in case kernel does not support prctl operations. + +* Wed Mar 5 2003 Khalid Aziz (khalid_aziz@hp.com) +- Added "always-signal" option to --unaligned for ia64. + * Wed Oct 17 2001 Khalid Aziz (khalid_aziz@hp.com) - Added option to set floating point emulation behavior. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org