Skip to content

Commit

Permalink
Rest of changes for packaging using the new scheme.
Browse files Browse the repository at this point in the history
Use ZIP files for OS X (easier to work with than disk images)

Add script to run tests from the build directory.
  • Loading branch information
Michael Sweet committed Nov 6, 2015
1 parent 1d20942 commit beef9e2
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 43 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -5,7 +5,9 @@ config.log
config.status
cups/libcups.a
sw-ippeveselfcert10-*
tests/pwg-raster-samples-*
tools/ippfind
tools/ippserver
tools/ipptool
*.o
*Results.plist
2 changes: 1 addition & 1 deletion Makedefs.in
Expand Up @@ -17,7 +17,7 @@
#

SELFCERTVERSION = @CUPS_VERSION@

IPPEVESELFCERT_VERSION = @IPPEVESELFCERT_VERSION@

#
# Programs...
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -73,7 +73,7 @@ clang-changes:

.PHONEY: dist
dist: all
scripts/make-ippeveselfcert.sh $(SELFCERTVERSION)
scripts/make-ippeveselfcert.sh $(IPPEVESELFCERT_VERSION) $(SELFCERTVERSION)


#
Expand Down
71 changes: 61 additions & 10 deletions README.md
Expand Up @@ -2,37 +2,88 @@

The IPP Everywhere Printer self-certification tools are used to test the conformance of printers to PWG Candidate Standard 5100.14-2013: IPP Everywhere. The testing and submission procedures are defined in the draft IPP Everywhere Printer Self-Certification Manual.

The [IPP Everywhere home page](http://www.pwg.org/ipp/everywhere.html) provides access to all information relevant to IPP Eveywhere.
The [IPP Everywhere home page](http://www.pwg.org/ipp/everywhere.html) provides access to all information relevant to IPP Eveywhere. Sample PWG Raster files (needed for the document tests) can be downloaded from [the PWG FTP server](http://ftp.pwg.org/pub/pwg/ipp/examples] - only the files dated June 16, 2015 (20150616) can be used.

The "ippeveselfcert@pwg.org" mailing list is used to discuss IPP Everywhere Printer Self-Certification. You can subscribe at [https://www.pwg.org/mailman/listinfo/ippeveselfcert](https://www.pwg.org/mailman/listinfo/ippeveselfcert).

Issues found in the tools should be reported using the [Github issues page](http://github.com/istopwg/ippeveselfcert).


# Compiling and Packaging

## Linux

You'll need the Avahi and GNU TLS developer packages to provide DNS-SD and TLS support, clang or GCC, and GNU make. Packages are targeted for Red Hat Enterprise Linux and Ubuntu.

Run:
You'll need the Avahi and GNU TLS developer packages to provide DNS-SD and TLS support, clang or GCC, and GNU make. Packages are targeted for Red Hat Enterprise Linux and Ubuntu. Run the following to compile the tools:

./configure
make dist
make

## OS X

You'll need the current Xcode software and command-line tools to build things. Packaging require a code signing certificate from a valid Certificate Authority - a certificate from Apple is not sufficient for general distribution.

Run:
You'll need the current Xcode software and command-line tools to build things. Run the following to compile the tools:

./configure
CODESIGN_IDENTITY="common name" make dist
make

## Windows

You'll need the current Visual Studio C++ as well as the code signing tools and a code signing certificate from a valid Certificate Authority.
You'll need the current Visual Studio C++ as well as the code signing tools and the PWG code signing certificate (available from the PWG officers for official use only) - without the certificate the build will fail unless you disable the post-build events that add the code signatures.

Open the "ippeveselfcert.sln" file in the "vcnet" subdirectory and build the installer project.


# Running/Testing

## Linux and OS X

The "runtests.sh" script can be used to run any of the test scripts using the locally-built tools. For example:

./runtests.sh bonjour-tests.sh "Example Test Printer"
./runtests.sh ipp-tests.sh "Example Test Printer"
./runtests.sh document-tests.sh "Example Test Printer"

The corresponding PWG Raster sample files (see link in the introduction) MUST be placed in a subdirectory of the "tests" directory. For example:

cd tests
curl http://ftp.pwg.org/pub/pwg/ipp/examples/pwg-raster-samples-300dpi-20150616.zip >temp.zip
unzip temp.zip
rm temp.zip
cd ..

## Windows

You'll need to manually copy the DLL and EXE files from the "vcnet" directory to the "tests" directory. Then run the corresponding test from that directory, for example:

cd tests
bonjour-tests.bat "Example Test Printer"
ipp-tests.bat "Example Test Printer"
document-tests.bat "Example Test Printer"

The corresponding PWG Raster sample files (see link in the introduction) MUST be placed in a subdirectory of the "tests" directory. After downloading the files just extract them using Windows Explorer.


# Packaging

## Linux

Run:

make dist

A tar.gz file will be placed in the current directory.


## OS X

You'll need the PWG code signing certificate (available from the PWG officers for official use only) or your own certificate loaded into your login keychain. Then run:

CODESIGN_IDENTITY="common name or SHA-1 hash of certificate" make dist

## Windows

If you built the installer target, you'll find the package in a MSI file in the "vcnet" directory.


# Legal Stuff

These tools are Copyright 2014-2015 by The Printer Working Group and Copyright 2007-2015 by Apple Inc. CUPS and the CUPS logo are trademarks of Apple Inc. PWG and IPP Everywhere are trademarks of the IEEE-ISTO.
Expand Down
20 changes: 10 additions & 10 deletions configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for IPPEVESELFCERT 20151009.
# Generated by GNU Autoconf 2.68 for IPPEVESELFCERT 20151106.
#
# Report bugs to <https://github.com/istopwg/ippeveselfcert/issues>.
#
Expand Down Expand Up @@ -560,8 +560,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='IPPEVESELFCERT'
PACKAGE_TARNAME='ippeveselfcert'
PACKAGE_VERSION='20151009'
PACKAGE_STRING='IPPEVESELFCERT 20151009'
PACKAGE_VERSION='20151106'
PACKAGE_STRING='IPPEVESELFCERT 20151106'
PACKAGE_BUGREPORT='https://github.com/istopwg/ippeveselfcert/issues'
PACKAGE_URL='http://www.pwg.org/ipp/everywhere.html'

Expand Down Expand Up @@ -1262,7 +1262,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures IPPEVESELFCERT 20151009 to adapt to many kinds of systems.
\`configure' configures IPPEVESELFCERT 20151106 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1323,7 +1323,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of IPPEVESELFCERT 20151009:";;
short | recursive ) echo "Configuration of IPPEVESELFCERT 20151106:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1431,7 +1431,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
IPPEVESELFCERT configure 20151009
IPPEVESELFCERT configure 20151106
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1857,7 +1857,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by IPPEVESELFCERT $as_me 20151009, which was
It was created by IPPEVESELFCERT $as_me 20151106, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -2238,7 +2238,7 @@ esac
ac_config_headers="$ac_config_headers config.h"


CUPS_VERSION="20151009"
CUPS_VERSION="20151106"
CUPS_REVISION=""


Expand Down Expand Up @@ -6720,7 +6720,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by IPPEVESELFCERT $as_me 20151009, which was
This file was extended by IPPEVESELFCERT $as_me 20151106, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -6783,7 +6783,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
IPPEVESELFCERT config.status 20151009
IPPEVESELFCERT config.status 20151106
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -17,7 +17,7 @@ dnl We need at least autoconf 2.60...
AC_PREREQ(2.60)

dnl Package name and version...
AC_INIT([IPPEVESELFCERT], [20151009], [https://github.com/istopwg/ippeveselfcert/issues], [ippeveselfcert], [http://www.pwg.org/ipp/everywhere.html])
AC_INIT([IPPEVESELFCERT], [20151106], [https://github.com/istopwg/ippeveselfcert/issues], [ippeveselfcert], [http://www.pwg.org/ipp/everywhere.html])

dnl IPP Everywhere Printer Self-Certification Manual Version; this is the
dnl filename prefix...
Expand Down
12 changes: 12 additions & 0 deletions runtests.sh
@@ -0,0 +1,12 @@
#!/bin/sh
#
# Script for running test scripts in the "tests" directory using the tools in
# this project.
#

if test $# != 2; then
echo "Usage: ./runtests.sh xxx-tests.sh 'Name of Printer'"
exit 1
fi

PATH="`pwd`/tools:$PATH" (cd tests; sh "$@")
35 changes: 15 additions & 20 deletions scripts/make-ippeveselfcert.sh
Expand Up @@ -22,14 +22,15 @@ if test ! -f scripts/make-ippeveselfcert.sh; then
exit 1
fi

if test $# -lt 1 -o $# -gt 2; then
echo "Usage: everywhere/make-ippeveselfcert.sh version [platform]"
if test $# -lt 2 -o $# -gt 3; then
echo "Usage: everywhere/make-ippeveselfcert.sh name version [platform]"
exit 1
fi

fileversion="$1"
if test $# = 2; then
platform="$2"
pkgname="$1"
fileversion="$2"
if test $# = 3; then
platform="$3"
else
case `uname` in
Darwin)
Expand All @@ -50,18 +51,8 @@ else
esac
fi

if test x$platform = xosx -a "x$CODESIGN_IDENTITY" = x; then
echo "Please set the CODESIGN_IDENTITY environment variable before running."
exit 1
fi

if test x$platform = xosx -a "x$HDIUTIL_CERT" = x; then
echo "Please set the HDIUTIL_CERT environment variable before running."
exit 1
fi

echo Creating package directory...
pkgdir="sw-ippeveselfcert10-$fileversion"
pkgdir="sw-$pkgname-$fileversion"

test -d $pkgdir && rm -r $pkgdir
mkdir $pkgdir || exit 1
Expand All @@ -83,15 +74,19 @@ chmod +x $pkgdir/*.sh

if test x$platform = xosx; then
# Sign executables...
if test "x$CODESIGN_IDENTITY" = x; then
CODESIGN_IDENTITY="IEEE INDUSTRY STANDARDS AND TECHNOLOGY ORGANIZATION"
fi

codesign -s "$CODESIGN_IDENTITY" -fv $pkgdir/ippfind
codesign -s "$CODESIGN_IDENTITY" -fv $pkgdir/ippserver
codesign -s "$CODESIGN_IDENTITY" -fv $pkgdir/ipptool

# Make disk image...
pkgfile="$pkgdir-osx.dmg"
echo Creating disk image $pkgfile...
# Make ZIP archive...
pkgfile="$pkgdir-osx.zip"
echo Creating ZIP file $pkgfile...
test -f $pkgfile && rm $pkgfile
hdiutil create -srcfolder $pkgdir -certificate "$HDIUTIL_CERT" $pkgfile
zip -r9 $pkgfile $pkgdir || exit 1
else
# Make archive...
pkgfile="$pkgdir-$platform.tar.gz"
Expand Down

0 comments on commit beef9e2

Please sign in to comment.