pax_global_header00006660000000000000000000000064121355441420014513gustar00rootroot0000000000000052 comment=42f99cc0261334cac106ab647615a33bd5f3d0b2 repocop-unittest-systemd-0.05/000075500000000000000000000000001213554414200164475ustar00rootroot00000000000000repocop-unittest-systemd-0.05/.gear/000075500000000000000000000000001213554414200174435ustar00rootroot00000000000000repocop-unittest-systemd-0.05/.gear/rules000064400000000000000000000000071213554414200205150ustar00rootroot00000000000000tar: . repocop-unittest-systemd-0.05/repocop-unittest-systemd.spec000064400000000000000000000025521213554414200243410ustar00rootroot00000000000000Name: repocop-unittest-systemd Version: 0.05 Release: alt1 BuildArch: noarch Packager: Igor Vlasenko Url: http://repocop.altlinux.org Summary: systemd integration tests for repocop test platform. Group: Development/Other License: GPLv2+ Source: %name-%version.tar # for pixmap-in-deprecated-location # Requires: pcregrep Requires: repocop-collector-systemd Requires: repocop > 0.59 %description The test check systemd related files. %prep %setup %build %install for i in *.posttest; do testname=`echo $i | sed -e s,.posttest\$,,` install -pD -m 755 $testname.posttest %buildroot%_datadir/repocop/pkgtests/$testname/posttest done install -D -m 755 systemd.dir-verify.pl %buildroot%_bindir/systemd.dir-verify.pl rm systemd.dir-verify.pl for i in *.pl; do install -pD -m 644 $i %buildroot%_datadir/repocop/fixscripts/$i done %files %_bindir/* %_datadir/repocop/pkgtests/* %_datadir/repocop/fixscripts/* %changelog * Tue Apr 23 2013 Igor Vlasenko 0.05-alt1 - bugfix release * Mon Apr 22 2013 Igor Vlasenko 0.04-alt1 - bugfix release * Mon Apr 22 2013 Igor Vlasenko 0.03-alt1 - bugfix release * Sun Apr 21 2013 Igor Vlasenko 0.02-alt1 - added *-files-in-etc tests and patch generators * Mon Jul 09 2012 Igor Vlasenko 0.01-alt1 - first release for Sysiphus repocop-unittest-systemd-0.05/systemd-check-socket-name.posttest000064400000000000000000000004611213554414200252260ustar00rootroot00000000000000#!/bin/sh pushd "$REPOCOP_STATEDIR/systemd" >/dev/null for key in * ; do case $key in systemd-*|udev-*) : # skip ;; *) msg=`systemd.dir-verify.pl $key` RETVAL=$? [ $RETVAL -gt 0 ] && repocop-test-experimental -k $key "$msg" ;; esac done popd >/dev/null repocop-unittest-systemd-0.05/systemd-files-in-etc.pl000064400000000000000000000013511213554414200227510ustar00rootroot00000000000000#!/usr/bin/perl -w push @SPECHOOKS, sub { my ($spec, $parent, $pkgname) = @_; my $macroize=sub {s,(?:\%{?_sysconfdir}?|/etc)/tmpfiles.d(/|\s|$),%_tmpfilesdir$1,g}; my $isec=$spec->get_section('install'); if ($isec) { $isec->map_body($macroize) or # move explicitly $isec->push_body(q!# sysconf/udev policy - /etc is for user mkdir -p %buildroot%_tmpfilesdir/ mv %buildroot%_sysconfdir/tmpfiles.d/* %buildroot%_tmpfilesdir/ !); } my $fsec=$spec->get_section('files',"-n $pkgname"); $fsec=$spec->get_section('files','base') if not $fsec and $pkgname eq 'apache2-base'; if ($fsec) { $fsec->map_body($macroize); } else { warn "Oops: systemd-files-in-etc: no section files -n $pkgname :(\n"; } }; 1; repocop-unittest-systemd-0.05/systemd-files-in-etc.posttest000064400000000000000000000007531213554414200242300ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <1} @services; if (@services) { foreach my $socket (@sockets) { my $matchservice=$socket; $matchservice=~s/\.socket$/.service/; unless ($service{$matchservice}) { print "in $sysddir: there is a socket ",&basename($socket)," but no service ",&basename($matchservice),". Ask ildar@ why it is not right.\n"; $mismatch=1; } } } } sub basename { my $file=shift; $file=~s!^.*/!!; return $file; } repocop-unittest-systemd-0.05/udev-files-in-etc.pl000064400000000000000000000012241213554414200222230ustar00rootroot00000000000000#!/usr/bin/perl -w push @SPECHOOKS, sub { my ($spec, $parent, $pkgname) = @_; my $macroize=sub {s,(?:\%{?_sysconfdir}?|/etc)/udev/rules.d(/|\s|$),%_udevrulesdir$1,g}; my $isec=$spec->get_section('install'); if ($isec) { $isec->map_body($macroize) or # move explicitly $isec->push_body(q!# sysconf/udev policy - /etc is for user mkdir -p %buildroot%_udevrulesdir/ mv %buildroot%_sysconfdir/udev/rules.d/* %buildroot%_udevrulesdir/ !); } my $fsec=$spec->get_section('files',"-n $pkgname"); if ($fsec) { $fsec->map_body($macroize); } else { warn "Oops: udev-files-in-etc: no section files -n $pkgname :(\n"; } }; 1; repocop-unittest-systemd-0.05/udev-files-in-etc.posttest000064400000000000000000000007461213554414200235050ustar00rootroot00000000000000#!/bin/sh sqlite3 "$REPOCOP_TEST_TMPDIR/tmp.db" <