-
Notifications
You must be signed in to change notification settings - Fork 6
/
README
115 lines (85 loc) · 4.51 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
How to setup openprinting site and database from bazaar branch
==============================================================
1) Copy the whole contents of the site branch to a folder where it is going to
be located I.e.,
# cp printing-new/* /srv/www/openprinting/
2) Install the bzr and build-essential packages if you have not done so yet.
3) Install Foomatic into the setup:
# export WORKDIR=/srv/www/openprinting/foomatic
# cd $WORKDIR
# bzr branch http://bzr.linuxfoundation.org/openprinting/foomatic/foomatic-db-engine
# bzr branch http://bzr.linuxfoundation.org/openprinting/foomatic/foomatic-db
# bzr branch http://bzr.linuxfoundation.org/openprinting/foomatic/foomatic-db-nonfree
# cd foomatic-db-engine
# ./make_configure
# ./configure
# make inplace
# cd ../..
4) Install a secondary copy of Foomatic for maintaining pre-built ppd files:
# export WORKDIR=/srv/www/openprinting/ppd/foomatic
# mkdir -p $WORKDIR
# cd $WORKDIR
# bzr branch http://bzr.linuxfoundation.org/openprinting/foomatic/foomatic-db-engine
# bzr branch http://bzr.linuxfoundation.org/openprinting/foomatic/foomatic-db
# bzr branch http://bzr.linuxfoundation.org/openprinting/foomatic/foomatic-db-nonfree
# cd foomatic-db-engine
# ./make_configure
# ./configure
# make inplace
# ./foomatic-compiledb -j 4 -t ppd -f -d $WORKDIR/ppd/ppd-files
# cd ../../..
5) Create "inc/siteconf.php" configuration file for the site. You can use
siteconf-DEV.php or siteconf-PROD.php as a basis. In that file you should set
access parameters for the MySQL database, mail addresses and some other settings.
6) Edit the "build" script - set BASEDIR variable at the top of the script to the actual directory where the site is located
7) Launch the build script:
# ./build
Note that this script uses inc/siteconf.php to create mysql.conf file for
foomatic.
8) If you want to create openprinting database from scratch, launch setupdb.sh
script from the maint/scripts folder:
# cd maint/scripts
# ./setupdb.sh
Note that setupdb.sh uses inc/siteconf.php to get database access parameters.
9) Now you can populate the database using the data from bzr using
"importfrombzr" script which tries to parse printer xml files and load them
to the database. Let's try to import everything from foomatic-db and
foomatic-db-nonfree:
# export WORKDIR=/srv/www/openprinting/foomatic
# revno=`cd $WORKDIR/foomatic-db && bzr revno`
# maint/scripts/importfrombzr $WORKDIR/foomatic-db 1 $revno
# revno=`cd $WORKDIR/foomatic-db-nonfree && bzr revno`
# maint/scripts/importfrombzr $WORKDIR/foomatic-db-nonfree 1 $revno
10) The next step is setting up the management for printer driver querying.
Install snap on your system and ensure it is running. Additionally install
mailx for automatic reporting of information related to this feature.
11) Create "snap/papp_list_recipient.txt". Each line of this file should be
one email address which will receive updates about new potential printer
applications in the snap store as well as any errors reported by the querying
scripts.
12) Modify "snap/error-report.sh" and "snap/printer-app-check.sh" to change
the sender email from "[email protected]" to one owned by you and attached
to your mail relay.
13) Create "snap/printer-apps.txt". Each line of this file should be the name
of a printer application found on the snap store that you wish to have
installed for use in printer driver querying. These should be in priority
order. If desired, each line can additionally have a second application name
that specifies the actual binary name to be called.
Example:
# cat snap/printer-apps.txt
hplip-printer-app hplip-printer-app
gutenprint-printer-app
The first "hplip-printer-app" is the name of the application on the snap store.
The second on the same line is the actual snap binary that will be called. If
there is no need to specify separate snap store name and binary name, then
only one name needs to be specified.
14) Create cron jobs to run the following:
snap/cache-check.sh Checks if the output cache has been invalidated,
and if so clears the cache.
snap/error-report.sh Reports errors periodically via email.
snap/printer-app-check.sh Checks the snap store for new printer apps,
reports the new apps via email.
snap/update-printer-apps.sh Ensures the desired printer apps are installed
and in the correct state.
======
That's all. Now you should be able to access your copy of the openprinting site.