rpms/cpm/F-9 cpm-0.23beta-disclaimer.patch, NONE, 1.1 cpm-0.23beta-make.patch, NONE, 1.1 cpm-0.23beta-open.patch, NONE, 1.1 cpm-0.23beta-sigint.patch, NONE, 1.1 cpm.pod, NONE, 1.1 cpm.spec, NONE, 1.1 sources, 1.1, 1.2

Marek Mahut mmahut at fedoraproject.org
Mon Jan 19 11:33:41 UTC 2009


Author: mmahut

Update of /cvs/pkgs/rpms/cpm/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20774

Modified Files:
	sources 
Added Files:
	cpm-0.23beta-disclaimer.patch cpm-0.23beta-make.patch 
	cpm-0.23beta-open.patch cpm-0.23beta-sigint.patch cpm.pod 
	cpm.spec 
Log Message:
initial import


cpm-0.23beta-disclaimer.patch:

--- NEW FILE cpm-0.23beta-disclaimer.patch ---
Marek Mahut <mmahut at fedoraproject.org>: adding security disclaimer

diff -Naur cpm-0.23beta-upstream/security.c cpm-0.23beta/security.c
--- cpm-0.23beta-upstream/security.c	2009-01-05 15:24:31.000000000 +0100
+++ cpm-0.23beta/security.c	2009-01-08 13:36:16.000000000 +0100
@@ -228,7 +228,7 @@
     else
       {
         if (!silent)
-          { printf("%s%s%s (%s)\n", STAT_RED, _("no"), STAT_OFF, memlimit); }
+          { printf("%s%s%s (%s)\n", STAT_RED, _("no"), STAT_OFF, memlimit); printf("\n%-50s\n", "For information how to configure your system for maximum security, please read README file included with this package.\n"); }
       }
 #endif
 #endif

cpm-0.23beta-make.patch:

--- NEW FILE cpm-0.23beta-make.patch ---
Marek Mahut <mmahut at fedoraproject.org>: We are setuid-ing it using rpm

diff -Naur cpm-0.23beta-upstream/Makefile.in cpm-0.23beta/Makefile.in
--- cpm-0.23beta-upstream/Makefile.in	2009-01-05 15:24:31.000000000 +0100
+++ cpm-0.23beta/Makefile.in	2009-01-05 15:57:40.000000000 +0100
@@ -374,7 +374,7 @@
 # install everything
 .PHONY: install
 install: cpm gettext
-	$(INSTALL) -D --mode=4755 --owner=root --group=root @PACKAGE_NAME@ $(DESTDIR)$(bindir)/@PACKAGE_NAME@
+	$(INSTALL) -D --mode=755 @PACKAGE_NAME@ $(DESTDIR)$(bindir)/@PACKAGE_NAME@
 	$(INSTALL) -D --mode=644 ./po/de_DE.mo $(DESTDIR)$(localedir)/de/LC_MESSAGES/@PACKAGE_NAME at .mo
 	$(INSTALL) -D --mode=644 ./docs/cpm.1.gz $(DESTDIR)$(mandir)/man1/cpm.1.gz
 

cpm-0.23beta-open.patch:

--- NEW FILE cpm-0.23beta-open.patch ---
open() takes three arguments when used with O_CREAT.
Furthermore, opening "/dev/null" and unsuccessfully creating it if it does
not exist and assuming everything's ok in that case makes no sense either.
Fix the test to be a bit more sane.

Lubomir Rintel <lkundrak at v3.sk>

diff -up cpm-0.23beta/security.c.open cpm-0.23beta/security.c
--- cpm-0.23beta/security.c.open	2009-01-08 16:45:49.000000000 +0100
+++ cpm-0.23beta/security.c	2009-01-08 16:46:54.000000000 +0100
@@ -495,15 +495,13 @@ int initSecurity(int* max_mem_lock, int*
     /* check that stderr, stdin and stdout are opened */
     /* NOTE: no file must be opened before this test! */
     /* Flawfinder: ignore */
-    canary = open("/dev/null", O_CREAT);
-    if ((canary >= 0) && (canary <= 2))
+    close (canary = dup(0));
+    if (canary != 3)
       {
         fprintf(stderr, "%s\n",
             _("stdin, stdout and/or stderr are invalid."));
-        close (canary);
         return 1;
       }
-    close (canary);
 
     return clearEnvironment();
   }


cpm-0.23beta-sigint.patch:

--- NEW FILE cpm-0.23beta-sigint.patch ---
Marek Mahut <mmahut at fedoraproject.org>: Correctly destroy window at ctrl-C

diff -Naur cpm-0.23beta-upstream/cpm.c cpm-0.23beta/cpm.c
--- cpm-0.23beta-upstream/cpm.c	2009-01-05 15:24:31.000000000 +0100
+++ cpm-0.23beta/cpm.c	2009-01-08 13:45:30.000000000 +0100
@@ -267,7 +267,8 @@
     if (signum == SIGINT ||
         signum == SIGTERM)
       {   /* we have to quit right away */
-        fileLockRemove(&dummy);
+        fileLockRemove(&dummy); 
+	destroyScreen(__LINE__, NULL);
         _exit(1);
       }
   }


--- NEW FILE cpm.pod ---
=head1 NAME

cpm - Console Password Manager

=head1 SYNOPSIS

cpm [--config FILE] [--configtest] [--encoding] [--file FILE] [--help]
    [--key KEY] [--noencryption] [--readonly] [--security] [--testrun TYPE]
    [--version] [PATH]

=head1 DESCRIPTION

Keep a password database safe and encrypted.

=head1 OPTIONS

=over 8

=item B<-c>, B<--config>

configuration file to use [~/.cpmrc]

=item B<--configtest>

verify the configuration file and exit

=item B<-e>, B<--encoding>

the encoding in which keyboard input arrives [ISO-8859-1]

=item B<-f>, B<--file>

database file to use [~/.cpmdb]

=item B<-h>, B<--help>

display this help

=item B<--key>

overwrite the default encryption keys and use this key instead; repeat for several keys

=item B<--noencryption>

turn off file encryption WARNING: THIS IS  FOR  DEVELOPMENT  AND TESTING ONLY!

=item B<-r>, B<--readonly>

open the database in read-only mode

=item B<-s>, B<--security>

run a security check and show the current security status

=item B<--testrun>

run one of the testmodes

backup run test on the backupfile creation

compress[fB-6]
     run compression test 1-6

decrypt
     run test on the decryption code

encrypt
     run test on the encryption code

environment
     run test on the environment validation

garbage
     run test on garbage input files

searchpattern
     run  test on the search patterns This only works when the
     application has been compiled with the compiler flag - DTEST_OPTION.

=item B<--version>

display the version and exit

=head1 KEYS

=over 8

=item B<^A>

add a new node to the current node.

=item B<^D>

delete  the currently selected node and all its subnodes.

=item B<^E>

edit the currently selected node.

=item B<^H>

show the help screen.

=item B<^K>

edit the currently used encryption keys.

=item B<^N>

edit the name of the current level.

=item B<^O>

edit the comment of the selected node.

=item B<^P>

edit the current node and suggest a password.

=item B<^W>

write the database to disk.

=head1 ENVIRONMENT

The following environment variables are used by the application,
all other variables are discarded at program startup:

=item B<GNUPGHOME>

If set directory used instead of "~/.gnupg".

=item B<GPG_AGENT_INFO>

Used  to  locate the gpg-agent

=item B<HOME>

Used to locate the default home directory.

=item B<LANG>

Used to determine the user’s language.

=item B<COLUMNS>

Used to size some displays to the full size of the screen.

=item B<LINES>

Used to size some displays to the full size of the screen.

=item B<TERMCAP>

Terminal settings of the currently used terminal.

=item B<TERM>

Terminal settings of the currently used terminal.

=head1 IMPORT

The data import utilities are installed in /usr/share/cpm and the following formats can be imported:

=item . csv

=item . passwordsafe

=item . pms

=head1 SEE ALSO

gpg(1)

=head1 REPORTING BUGS

Report bugs to <harry_b at mm.st>.

=head1 COPYRIGHT

Copyright (C) 2005, 2006 Harry Brueckner

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 any later
version.  This program is distributed in the hope that it will be  use-
ful,  but  WITHOUT  ANY  WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the  GNU  Gen-
eral  Public License for more details.  You should have received a copy
of the GNU General Public License along  with  this  program;  if  not,
write  to  the  Free  Software  Foundation, Inc., 51 Franklin St, Fifth
Floor, Boston, MA 02110-1301, USA.

Contact: Harry Brueckner <harry_b at mm.st> Muenchener Strasse  12a  85253
Kleinberghofen Germany


--- NEW FILE cpm.spec ---
Name:		cpm
Version:	0.23
Release:	0.1.beta%{?dist}
Summary:	Console Password Manager

Group:		Applications/Databases
License:	GPLv2+
URL:		http://www.harry-b.de/dokuwiki/doku.php?id=harry:cpm
Source0:	http://dl.sf.net/%{name}/%{name}-%{version}beta.tar.gz
Source1:	cpm.pod
Patch0:		cpm-0.23beta-make.patch
Patch1:		cpm-0.23beta-disclaimer.patch
Patch2:		cpm-0.23beta-sigint.patch
Patch3:		cpm-0.23beta-open.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	cracklib-devel, cracklib-dicts
BuildRequires:	gpgme-devel
BuildRequires:	cdk-devel
BuildRequires:	dotconf-devel 
BuildRequires:	ncurses-devel
BuildRequires:	libxml2-devel >= 2.6.16,
BuildRequires:	zlib-devel
BuildRequires:	gettext

%description
CPM is a ncurses based console tool to manage passwords
and store them public key encrypted in a file - even for
more than one person. The encryption is handled via GnuPG
so the programs data can be accessed via gpg as well,
in case you want to have a look inside. The data is stored
as as zlib compressed XML so it’s even possible to reuse
the data for some other purpose.

%prep
%setup -q -n %{name}-%{version}beta
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
for file in docs/changelog docs/ChangeLog docs/cpm.txt docs/GPLv2 docs/README; do
	mv $file timestamp
	iconv -f ISO-8859-1 -t UTF-8 -o $file timestamp
	touch -r timestamp $file
done

%build
%configure --with-crack-dict=%{_libdir}/cracklib_dict CFLAGS="-I/usr/include/cdk/ %{optflags}" 
make %{?_smp_mflags} 
pod2man --release=%{name}-%{version}beta --center="%{summary}" --name=%{name} %{SOURCE1} ./docs/cpm.1

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT mandir="%{_mandir}"
install -D -p -m 644 conf/cpmrc-default $RPM_BUILD_ROOT%{_sysconfdir}/cpmrc
%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc conf/cpmrc-default docs/ChangeLog docs/changelog docs/GPLv2 docs/README ./share/cpm/*
%attr (4755,root,root) %{_bindir}/cpm
%config(noreplace) %{_sysconfdir}/cpmrc
%{_mandir}/man1/cpm*

%changelog
* Mon Jan 5 2009 Marek Mahut <mmahut at fedoraproject.org> - 0.23beta-1
- Initial build


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/cpm/F-9/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	11 Jan 2009 16:57:09 -0000	1.1
+++ sources	19 Jan 2009 11:33:09 -0000	1.2
@@ -0,0 +1 @@
+55912d0a716450b2ee338a7885d3a213  cpm-0.23beta.tar.gz




More information about the fedora-extras-commits mailing list