staging.inyokaproject.org

lessfs und init Skript - Dateien werden nicht in das Paket eingebaut

Status: Ungelöst | Ubuntu-Version: 12.04 (Precise Pangolin)
Antworten |

roemer2201

Avatar von roemer2201

Anmeldungsdatum:
2. November 2007

Beiträge: Zähle...

Hallo Zusammen,

ich bin gerade dabei mir mein erstes eigens deb-Paket zu bauen. Ich möchte mir gern "lessfs" als Paket bauen, um es möglichst einfach installieren und updaten zu können. Im Prinzip klappt auch alles, das deb-Paket wird erstellt, jedoch möchte ich ein paar eigene Dateien mit in das Paket integrieren (init-Skript, ...) und das bekomme ich nicht hin.

Ich würde gern mal eine TeamViewer+Skype Sitzung machen, um die Situation einfach schildern zu können und dann gemeinsam das Paket bauen zu können. Wer hat Lust und Zeit sich meiner anzunehmen?

Vielen Dank im voraus!

LG Roemer2201

Bearbeitet von Lasall:

Titel auf Wunsch angepasst.

Lasall

Ehemalige
Avatar von Lasall

Anmeldungsdatum:
30. März 2010

Beiträge: 7723

Hi roemer2201,

wenn du mit dem Forum vorlieb nehmen kannst, versuche ich gerne zu helfen. Wegen init-Skript schaue dir die Manpage zu dh_installinit an. (Und falls nicht schon geschehen Dienste.)

Gruss Lasall

tomtomtom Team-Icon

Supporter
Avatar von tomtomtom

Anmeldungsdatum:
22. August 2008

Beiträge: 55572

roemer2201 schrieb:

Ich würde gern mal eine TeamViewer+Skype Sitzung machen, um die Situation einfach schildern zu können und dann gemeinsam das Paket bauen zu können. Wer hat Lust und Zeit sich meiner anzunehmen?

*Seufz* ▶ Richtig fragen

Bitte verlange nicht, dass man Dich sofort per Mail, ICQ, Jabber und Co. berät. Du stellst Deine Frage in einem öffentlichen Forum, also ermögliche auch bitte der Öffentlichkeit die Lösung Deines Problems nachzuvollziehen. So bleibt die Lösung nicht in den Tiefen von zwei Logdateien versteckt, sondern ist auch in Zukunft für die gesamte Gemeinschaft verfügbar. Andere Kommunikationswege sollen ein Mittel zum Zweck sein, wenn es doch mal nicht weitergehen sollte. Doch betrachte das Forum bitte als die Plattform erster Wahl.

roemer2201

(Themenstarter)
Avatar von roemer2201

Anmeldungsdatum:
2. November 2007

Beiträge: Zähle...

Ja, ich sehe das schon ein, nur ist manchmal die Problembeschreibung aufwendiger im Vergleich zur eigentlichen Lösung, die eventuell in einem Satz gesagt ist. Aber gut, dennoch möchte ich es versuchen. Hier meine Befehls-History, nachdem ich die Anleitung zum Paketbau (http://developer.ubuntu.com/packaging) durchgearbeitet und eigentlich auch verstanden habe:

 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
$ wget ... *sourceforge*lessfs_1.5.12.tar.gz # Hab die URL gerade nicht zur Hand
$ bzr dh-make lessfs 1.5.12 lessfs-1.5.12.tar.gz # Typ: Single Binary [s]
$ cd lessfs
$ bzr builddeb -- -us -uc # Das läuft sauber durch und das deb ist auch erstellt worden
$ cd ..
$ dpkg --contents lessfs_1.5.12-1_i386.deb 
drwxr-xr-x root/root         0 2012-10-10 21:10 ./
drwxr-xr-x root/root         0 2012-10-10 21:10 ./usr/
drwxr-xr-x root/root         0 2012-10-10 21:10 ./usr/share/
drwxr-xr-x root/root         0 2012-10-10 21:10 ./usr/share/man/
drwxr-xr-x root/root         0 2012-10-10 21:10 ./usr/share/man/man1/
-rw-r--r-- root/root      6182 2012-10-10 21:10 ./usr/share/man/man1/lessfs.1.gz
-rw-r--r-- root/root      1159 2012-10-10 21:10 ./usr/share/man/man1/replogtool.1.gz
drwxr-xr-x root/root         0 2012-10-10 21:10 ./usr/share/doc/
drwxr-xr-x root/root         0 2012-10-10 21:10 ./usr/share/doc/lessfs/
-rw-r--r-- root/root      1200 2012-10-10 21:09 ./usr/share/doc/lessfs/README.file_io
-rw-r--r-- root/root      1483 2012-10-10 21:09 ./usr/share/doc/lessfs/copyright
-rw-r--r-- root/root       590 2012-10-10 21:09 ./usr/share/doc/lessfs/README.crypto
-rw-r--r-- root/root      1112 2012-10-10 21:09 ./usr/share/doc/lessfs/FAQ
-rw-r--r-- root/root       172 2012-10-10 21:09 ./usr/share/doc/lessfs/README.Debian
-rw-r--r-- root/root       313 2012-10-10 21:09 ./usr/share/doc/lessfs/README.upgrade_to_1.5.2_with_replication
-rw-r--r-- root/root       620 2012-10-10 21:09 ./usr/share/doc/lessfs/README
-rw-r--r-- root/root      2421 2012-10-10 21:09 ./usr/share/doc/lessfs/README.berkeleydb
-rw-r--r-- root/root      3900 2012-10-10 21:09 ./usr/share/doc/lessfs/README.replication
-rw-r--r-- root/root       988 2012-10-10 21:09 ./usr/share/doc/lessfs/README.performance_or_suffer
-rw-r--r-- root/root       172 2012-10-10 21:09 ./usr/share/doc/lessfs/changelog.Debian.gz
-rw-r--r-- root/root       832 2012-10-10 21:09 ./usr/share/doc/lessfs/README.compression
-rw-r--r-- root/root       540 2012-10-10 21:09 ./usr/share/doc/lessfs/README.chunk_io
drwxr-xr-x root/root         0 2012-10-10 21:10 ./usr/sbin/
-rwxr-xr-x root/root    141276 2012-10-10 21:10 ./usr/sbin/replogtool
-rwxr-xr-x root/root    137176 2012-10-10 21:10 ./usr/sbin/listdb
-rwxr-xr-x root/root    149480 2012-10-10 21:10 ./usr/sbin/lessfsck
-rwxr-xr-x root/root    141288 2012-10-10 21:10 ./usr/sbin/mklessfs
drwxr-xr-x root/root         0 2012-10-10 21:10 ./usr/bin/
-rwxr-xr-x root/root    166148 2012-10-10 21:10 ./usr/bin/lessfs
$ ll | egrep -v '.ex|.EX'
insgesamt 124
drwxrwxr-x 3 oliver oliver  4096 Okt 10 21:09 ./
drwxrwxr-x 8 oliver oliver  4096 Okt 10 21:09 ../
-rw-rw-r-- 1 oliver oliver   182 Okt 10 21:09 changelog
-rw-rw-r-- 1 oliver oliver     2 Okt 10 21:09 compat
-rw-rw-r-- 1 oliver oliver   519 Okt 10 21:09 control
-rw-rw-r-- 1 oliver oliver  1483 Okt 10 21:09 copyright
-rw-rw-r-- 1 oliver oliver   182 Okt 10 21:09 docs
-rw-rw-r-- 1 oliver oliver   172 Okt 10 21:09 README.Debian
-rw-rw-r-- 1 oliver oliver   191 Okt 10 21:09 README.source
-rwxr-xr-x 1 oliver oliver   442 Okt 10 21:09 rules*
drwxr-xr-x 2 oliver oliver  4096 Okt 10 21:09 source/
$ ll | egrep '.ex|.EX'
-rw-rw-r-- 1 oliver oliver  1233 Okt 10 21:09 emacsen-install.ex
-rw-rw-r-- 1 oliver oliver   468 Okt 10 21:09 emacsen-remove.ex
-rw-rw-r-- 1 oliver oliver  1118 Okt 10 21:09 emacsen-startup.ex
-rw-rw-r-- 1 oliver oliver   128 Okt 10 21:09 lessfs.cron.d.ex
-rw-rw-r-- 1 oliver oliver   504 Okt 10 21:09 lessfs.doc-base.EX
-rw-rw-r-- 1 oliver oliver  1738 Okt 10 21:09 manpage.1.ex
-rw-rw-r-- 1 oliver oliver  4648 Okt 10 21:09 manpage.sgml.ex
-rw-rw-r-- 1 oliver oliver 11001 Okt 10 21:09 manpage.xml.ex
-rw-rw-r-- 1 oliver oliver   123 Okt 10 21:09 menu.ex
-rw-rw-r-- 1 oliver oliver   956 Okt 10 21:09 postinst.ex
-rw-rw-r-- 1 oliver oliver   929 Okt 10 21:09 postrm.ex
-rw-rw-r-- 1 oliver oliver   689 Okt 10 21:09 preinst.ex
-rw-rw-r-- 1 oliver oliver   876 Okt 10 21:09 prerm.ex
-rw-rw-r-- 1 oliver oliver   775 Okt 10 21:09 watch.ex
# Alle Dateien lasse ich vorerst so, wie sie sind, wenn ich sie posten soll, lasst es mich wissen
# In diesem Verzeichnis sind einige Example Files, die interessanten für mich wären ja:
# initi.d.ex
# lessfs.default.ex
mv lessfs.default.ex lessfs.default
mv init.d.ex init.d

Jedoch verursacht das umbenennen nicht, dass diese beiden Dateien mit in das Paket wandern. Gut, das ist ja in erster Linie auch nicht so schlimm, jedoch habe keine gescheiten Bespiele im Netz gefunden, wie man es nun wirklich anstellt.

Versucht habe ich schon folgendes: Eine Datei Namens "install" im Debian-Verzeichnis anlegen und mit folgendem Inhalt versehen:

1
2
debian/init.d etc/init.d
debian/lessfs.default etc/default

Ich weiß, der Schlüssel zum Erfolg muss in der rules-Datei liegen muss, jedoch konnte auch durch verschiedene Einträge nicht erreichen, dass die Files mit mit in das Paket wandern... (Ich habe mir meine Versuche leider nicht dokumentiert)

Grundsätzlich weiß ich aber, dass es geht, denn es gibt deb-Pakete von LessFS, z.B unter folgender PPA: ppa:brandonsnider/lessfs

Oder die fertigen Pakete hier direkt (gleiche PPA): https://launchpad.net/~brandonsnider/+archive/lessfs/+packages

1
wget https://launchpad.net/~brandonsnider/+archive/lessfs/+files/lessfs_1.4.8-1~natty~lessfsppa1_i386.deb

Ich habe dieses Paket auch schon auseinandergenommen, jedoch konnte ich nicht nachvollziehen wie ich zum gleichen Ziel komme.

Könnt Ihr mir weiterhelfen? Vielen Dank

Lasall

Ehemalige
Avatar von Lasall

Anmeldungsdatum:
30. März 2010

Beiträge: 7723

Hi roemer2201,

Initskripte speicherst du in der Datei debian/init oder debian/PAKETNAME.init, upstartscripte analog (wie in der Manpage beschrieben). Ansonsten zeige mal den Inhalt der involvierten Dateien.

Gruss Lasall

roemer2201

(Themenstarter)
Avatar von roemer2201

Anmeldungsdatum:
2. November 2007

Beiträge: 241

Hier alle interessanten Files aus dem Debian-Verzeichnis:

Vielen Dank für Deine Hilfe

  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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
$ find . -type f \! -name "*.ex" \! -name "*.EX" -exec echo -e "#================\n" {} "\n" \; -exec cat {} \;
#================
 ./init.d 

#!/bin/sh
### BEGIN INIT INFO
# Provides:          lessfs
# Required-Start:    $network $local_fs
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: <Enter a short description of the sortware>
# Description:       <Enter a long description of the software>
#                    <...>
#                    <...>
### END INIT INFO

# Author: roemer2201 <name@example.com>

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC=lessfs             # Introduce a short description here
NAME=lessfs             # Introduce the short server's name here
DAEMON=/usr/sbin/lessfs # Introduce the server's location here
DAEMON_ARGS=""             # Arguments to run the daemon with
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

# Exit if the package is not installed
[ -x $DAEMON ] || exit 0

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions

#
# Function that starts the daemon/service
#
do_start()
{
	# Return
	#   0 if daemon has been started
	#   1 if daemon was already running
	#   2 if daemon could not be started
	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
		|| return 1
	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
		$DAEMON_ARGS \
		|| return 2
	# Add code here, if necessary, that waits for the process to be ready
	# to handle requests from services started subsequently which depend
	# on this one.  As a last resort, sleep for some time.
}

#
# Function that stops the daemon/service
#
do_stop()
{
	# Return
	#   0 if daemon has been stopped
	#   1 if daemon was already stopped
	#   2 if daemon could not be stopped
	#   other if a failure occurred
	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
	RETVAL="$?"
	[ "$RETVAL" = 2 ] && return 2
	# Wait for children to finish too if this is a daemon that forks
	# and if the daemon is only ever run from this initscript.
	# If the above conditions are not satisfied then add some other code
	# that waits for the process to drop all resources that could be
	# needed by services started subsequently.  A last resort is to
	# sleep for some time.
	start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
	[ "$?" = 2 ] && return 2
	# Many daemons don't delete their pidfiles when they exit.
	rm -f $PIDFILE
	return "$RETVAL"
}

#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
	#
	# If the daemon can reload its configuration without
	# restarting (for example, when it is sent a SIGHUP),
	# then implement that here.
	#
	start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
	return 0
}

case "$1" in
  start)
    [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
    do_start
    case "$?" in
		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
	esac
  ;;
  stop)
	[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
	do_stop
	case "$?" in
		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
	esac
	;;
  status)
       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
       ;;
  #reload|force-reload)
	#
	# If do_reload() is not implemented then leave this commented out
	# and leave 'force-reload' as an alias for 'restart'.
	#
	#log_daemon_msg "Reloading $DESC" "$NAME"
	#do_reload
	#log_end_msg $?
	#;;
  restart|force-reload)
	#
	# If the "reload" option is implemented then remove the
	# 'force-reload' alias
	#
	log_daemon_msg "Restarting $DESC" "$NAME"
	do_stop
	case "$?" in
	  0|1)
		do_start
		case "$?" in
			0) log_end_msg 0 ;;
			1) log_end_msg 1 ;; # Old process is still running
			*) log_end_msg 1 ;; # Failed to start
		esac
		;;
	  *)
	  	# Failed to stop
		log_end_msg 1
		;;
	esac
	;;
  *)
	#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
	echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
	exit 3
	;;
esac

:
#================
 ./source/format 

3.0 (quilt)
#================
 ./compat 

8
#================
 ./lessfs.default 

# Defaults for lessfs initscript
# sourced by /etc/init.d/lessfs
# installed at /etc/default/lessfs by the maintainer scripts

#
# This is a POSIX shell fragment
#

# Additional options that are passed to the Daemon.
DAEMON_OPTS=""
#================
 ./rules 

#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@ 
#================
 ./copyright 

Format: http://dep.debian.net/deps/dep5
Upstream-Name: lessfs
Source: <url://example.com>

Files: *
Copyright: <years> <put authors name and email here>
           <years> <likewise for another author>
License: <special license>
 <Put the license of the package here indented by 1 space>
 <This follows the format of Description: lines in control file>
 .
 <Including paragraphs>

# If you want to use GPL v2 or later for the /debian/* files use 
# the following clauses, or change it to suit. Delete these two lines
Files: debian/*
Copyright: 2012 roemer2201 <name@example.com>
License: GPL-2+
 This package 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
 (at your option) any later version.
 .
 This package is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 .
 You should have received a copy of the GNU General Public License
 along with this program. If not, see <http://www.gnu.org/licenses/>
 .
 On Debian systems, the complete text of the GNU General
 Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
#================
 ./README.Debian 

lessfs for Debian
-----------------

<possible notes regarding this package - if none, delete this file>

 -- roemer2201 <name@example.com>  Wed, 10 Oct 2012 21:09:14 +0200
#================
 ./lessfs.install~ 

debian/lessfs.init etc/init.d
debian/lessfs.default etc/default
#================
 ./control 

Source: lessfs
Section: unknown
Priority: extra
Maintainer: roemer2201 <name@example.com>
Build-Depends: debhelper (>= 8.0.0), autotools-dev
Standards-Version: 3.9.2
Homepage: <insert the upstream URL, if relevant>
#Vcs-Git: git://git.debian.org/collab-maint/lessfs.git
#Vcs-Browser: http://git.debian.org/?p=collab-maint/lessfs.git;a=summary

Package: lessfs
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <insert up to 60 chars description>
 <insert long description, indented with spaces>
#================
 ./docs 

FAQ
README
README.berkeleydb
README.chunk_io
README.compression
README.crypto
README.file_io
README.performance_or_suffer
README.replication
README.upgrade_to_1.5.2_with_replication
#================
 ./lessfs.init 

#!/bin/sh -e  
# 
# lessfs  init.d startup script
#
# (C) 2010 Falk hackenberger <debian@spam.huckley.de>
# 
### BEGIN INIT INFO
# Provides:          lessfs
# Required-Start:    $syslog $remote_fs
# Required-Stop:     $syslog $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: lessfs
### END INIT INFO

NAME=lessfs
DAEMON=/usr/bin/$NAME
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
[ -x $DAEMON ] || exit 0
. /lib/lsb/init-functions

RET=0

[ -r /etc/default/$NAME ] && . /etc/default/$NAME

[ -z $MOUNTPOINT ] && exit 0 

[ -d $MOUNTPOINT ] || exit 0

[ -r $LESSFS_CONFIG  ] || exit 0

DAEMON_ARGS="$LESSFS_CONFIG $MOUNTPOINT $LESSFS_OPTS"

#
# Function that starts the daemon/service
#
do_start(){
        # Return
        #   0 if daemon has been started
        #   1 if daemon was already running
        #   2 if daemon could not be started
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
                || return 1
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
                $DAEMON_ARGS \
                || return 2
        # Add code here, if necessary, that waits for the process to be ready
        # to handle requests from services started subsequently which depend
        # on this one.  As a last resort, sleep for some time.
}

#
# Function that stops the daemon/service
#
do_stop()
{	
	umount $MOUNTPOINT
        RETVAL="$?"
	[ "$RETVAL" = 0 ] && rm -f $PIDFILE
        return "$RETVAL"
}

case "$1" in
  start)
    [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
    do_start
    case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
  ;;
  stop)
        [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
        do_stop
        case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;
  status)
       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
       ;;
  restart|force-reload)
        #
        # If the "reload" option is implemented then remove the
        # 'force-reload' alias
        #
        log_daemon_msg "Restarting $DESC" "$NAME"
        do_stop
        case "$?" in
          0|1)
                do_start
                case "$?" in
                        0) log_end_msg 0 ;;
                        0) log_end_msg 0 ;;
                        1) log_end_msg 1 ;; # Old process is still running
                        *) log_end_msg 1 ;; # Failed to start
                esac
                ;;
          *)
                # Failed to stop
                log_end_msg 1
                ;;
        esac
        ;;
  *)
        echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
        exit 3
        ;;
esac
:

#================
 ./changelog 

lessfs (1.5.12-1) unstable; urgency=low

  * Initial release (Closes: #nnnn)  <nnnn is the bug number of your ITP>

 -- roemer2201 <name@example.com>  Wed, 10 Oct 2012 21:09:14 +0200
#================
 ./README.source 

lessfs for Debian
-----------------

<this file describes information about the source package, see Debian policy
manual section 4.14. You WILL either need to modify or delete this file>



Lasall

Ehemalige
Avatar von Lasall

Anmeldungsdatum:
30. März 2010

Beiträge: 7723

Hi roemer2201,

die Datei init.d brauchst du nicht.

Und hier nochmal zur besseren Lesbarkeit die Datei lessfs.init:

  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
#!/bin/sh -e  
# 
# lessfs  init.d startup script
#
# (C) 2010 Falk hackenberger <debian@spam.huckley.de>
# 
### BEGIN INIT INFO
# Provides:          lessfs
# Required-Start:    $syslog $remote_fs
# Required-Stop:     $syslog $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: lessfs
### END INIT INFO

NAME=lessfs
DAEMON=/usr/bin/$NAME
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
[ -x $DAEMON ] || exit 0
. /lib/lsb/init-functions

RET=0

[ -r /etc/default/$NAME ] && . /etc/default/$NAME

[ -z $MOUNTPOINT ] && exit 0 

[ -d $MOUNTPOINT ] || exit 0

[ -r $LESSFS_CONFIG  ] || exit 0

DAEMON_ARGS="$LESSFS_CONFIG $MOUNTPOINT $LESSFS_OPTS"

#
# Function that starts the daemon/service
#
do_start(){
        # Return
        #   0 if daemon has been started
        #   1 if daemon was already running
        #   2 if daemon could not be started
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
                || return 1
        start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
                $DAEMON_ARGS \
                || return 2
        # Add code here, if necessary, that waits for the process to be ready
        # to handle requests from services started subsequently which depend
        # on this one.  As a last resort, sleep for some time.
}

#
# Function that stops the daemon/service
#
do_stop()
{	
	umount $MOUNTPOINT
        RETVAL="$?"
	[ "$RETVAL" = 0 ] && rm -f $PIDFILE
        return "$RETVAL"
}

case "$1" in
  start)
    [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
    do_start
    case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
  ;;
  stop)
        [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
        do_stop
        case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;
  status)
       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
       ;;
  restart|force-reload)
        #
        # If the "reload" option is implemented then remove the
        # 'force-reload' alias
        #
        log_daemon_msg "Restarting $DESC" "$NAME"
        do_stop
        case "$?" in
          0|1)
                do_start
                case "$?" in
                        0) log_end_msg 0 ;;
                        0) log_end_msg 0 ;;
                        1) log_end_msg 1 ;; # Old process is still running
                        *) log_end_msg 1 ;; # Failed to start
                esac
                ;;
          *)
                # Failed to stop
                log_end_msg 1
                ;;
        esac
        ;;
  *)
        echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
        exit 3
        ;;
esac

Bitte aktiviere in deiner debian/rules die DH_VERBOSE-Zeile und zeige vollständig folgende Ausgabe:

dpkg-buildpackage -us -uc 

Anschließend zeige bitte dpkg --contents PAKET.

Wenn du den Inhalt von Dateien zeigst, bitte in abgetrennten Codeblöcken, sonst ist das sehr unleserlich.

Gruss Lasall

roemer2201

(Themenstarter)
Avatar von roemer2201

Anmeldungsdatum:
2. November 2007

Beiträge: 241

Also vielen Dank für Deinen Tipp mit dpkg-buildpackage. Die Files sind mit im Paket enthalten ☺

Aber warum funktioniert das Kommando bzr builddeb – -us -uc nicht? Dieses Kommando wird auf der Ubuntu.com Packaging Seite genannt und auch eine ähnliche Erklärung zu den Files gegeben.

Was mich jetzt eher noch interessiert: ist das andere bzr Kommando bzr dh-make lessfs 1.5.12 lessfs-1.5.12.tar.gz trotzdem nötig? Ja oder, das baut mir den Debian-Ordner, richtig?

P.S. Kann bitte ein Moderator den Thread umbennen: "lessfs und init Skript - Dateien werden nicht in das Paket eingebaut". Danke!

Lasall

Ehemalige
Avatar von Lasall

Anmeldungsdatum:
30. März 2010

Beiträge: 7723

Hi roemer2201,

du schriebst:

Aber warum funktioniert das Kommando bzr builddeb – -us -uc nicht? Dieses Kommando wird auf der Ubuntu.com Packaging Seite genannt und auch eine ähnliche Erklärung zu den Files gegeben.

Arg, ich hatte das übersehen. Das häufigste Problem am Anfang mit bzr-builddeb ist, dass man vergisst Änderungen zu commiten... Also einfach committen, dann sollte es auch mit bzr funktionieren.

Was mich jetzt eher noch interessiert: ist das andere bzr Kommando bzr dh-make lessfs 1.5.12 lessfs-1.5.12.tar.gz trotzdem nötig? Ja oder, das baut mir den Debian-Ordner, richtig?

Ja genau. Wenn du das nicht von Scratch aus machen willst oder manuell mit dh_make, empfiehlt sich das.

Gruss Lasall

roemer2201

(Themenstarter)
Avatar von roemer2201

Anmeldungsdatum:
2. November 2007

Beiträge: 241

Lasall schrieb:

Arg, ich hatte das übersehen. Das häufigste Problem am Anfang mit bzr-builddeb ist, dass man vergisst Änderungen zu commiten... Also einfach committen, dann sollte es auch mit bzr funktionieren.

Das ist mit Sicherheit das Kernproblem dieses Threads 😉 Ich habe es einmal gebaut, dann die Init-Files hinzugefügt, aber nicht erneut commitet ...

Grüße Roemer2201

Antworten |