ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Michael Shigorin <mike@osdn.org.ua>
To: sisyphus@lists.altlinux.org
Subject: [sisyphus] q: pdfedit, qmake и $(INSTALL_ROOT)../../../../../../
Date: Mon, 19 Mar 2007 00:27:55 +0200
Message-ID: <20070318222753.GR13731@osdn.org.ua> (raw)

[-- Attachment #1: Type: text/plain, Size: 2443 bytes --]

	Здравствуйте.
Возможно, это типичные грабли и кто-то знает простой ответ...

Решил попробовать собрать pdfedit, подсунув adiel@ статью
http://applications.linux.com/print.pl?sid=07/03/09/1810218
и получив положительный отзыв.

Спек пришлось рисовать с нуля, по какому собраны пакеты на
pdfedit.sf.net -- непонятно.  Собирается, но не %install'ится:

=== pdfedit.spec ===
%install
unset QTDIR || : ; . /etc/profile.d/qt3dir.sh ; PATH=$PATH:$QTDIR/bin
export INSTALL_ROOT=%buildroot
mkdir -p %buildroot
%makeinstall
install -pD -m644 %SOURCE1 %buildroot%_desktopdir/%name.desktop

(про необходимость выставления INSTALL_ROOT подсмотрено
в debian/rules, больше нигде будто не водится)


=== src/gui/Makefile ===
install_data: all
        @$(CHK_DIR_EXISTS) "$(INSTALL_ROOT)../../../../../../share/pdfedit/" || $(MKDIR) "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "pdfeditrc" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "mode.conf" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "callback.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "delinearize.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "dialog_lib.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "dialogs.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "init.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "init_console.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "menu.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "page.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "pdfoperator.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "test.qs" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"
        -$(INSTALL_FILE) "operator.hint" "$(INSTALL_ROOT)../../../../../../share/pdfedit/"

=>

make[2]: Entering directory `/usr/src/RPM/BUILD/pdfedit-0.2.5/src/gui'
mkdir: cannot create directory `/usr/src/tmp/pdfedit-buildroot../../../../../../share': Permission denied

Вопрос очевиден: откуда бы это?

(пока похоже, что там на редкость кривая система сборки
и src/gui/Makefile порождается в процессе %makeinstall)

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/

[-- Attachment #2: pdfedit.spec --]
[-- Type: text/plain, Size: 1863 bytes --]

Name: pdfedit
Version: 0.2.5
Release: alt1

Summary: Editor for manipulating PDF documents
License: GPL
Group: File tools

Url: http://pdfedit.petricek.net
Source0: %name-%version.tar.bz2
Source1: %name.desktop
Packager: Michael Shigorin <mike@altlinux.org>

# Automatically added by buildreq on Sun Mar 18 2007
BuildRequires: boost-iostreams-devel doxygen gcc-c++ imake libXp-devel libXpm-devel libXt-devel libpaper-devel libqt3-devel t1lib-devel xorg-cf-files

%{?!_desktopdir:%define _desktopdir %_datadir/applications}

%description
Complete editing of pdf documents is made possible with PDFedit.
You can change either raw pdf objects (for advanced users) or use
predefined gui functions. Functions can be easily added as everything
is based on a scripts.

Scripting is used to a great extent in editor and almost anything can
be scripted, it is possible to create own scripts or plugins.

%prep
%setup -q

%build
unset QTDIR || : ; . /etc/profile.d/qt3dir.sh ; PATH=$PATH:$QTDIR/bin
%configure
#make_build
%make

%install
unset QTDIR || : ; . /etc/profile.d/qt3dir.sh ; PATH=$PATH:$QTDIR/bin
mkdir -p %buildroot
export INSTALL_ROOT=%buildroot
# ugly hackaround for b0rken makefile
#find src -name Makefile \
#| xargs sed -i 's,../../../../../..,%prefix,g'
##| xargs sed -i 's,\(\$(INSTALL_ROOT)\)../../../../../..,\1%prefix,g'
sed -i 's,../../../../../..,%prefix,g' src/gui/Makefile
#fgrep ../../../../../.. src/gui/Makefile ||:
%makeinstall
chmod 644 %buildroot%_datadir/%name/icon/hicolor/*
install -pD -m644 %SOURCE1 %buildroot%_desktopdir/%name.desktop

%files
%_bindir/*
%_datadir/%name/
%_desktopdir/*
%doc ChangeLog README

%changelog
* Sun Mar 18 2007 Michael Shigorin <mike@altlinux.org> 0.2.5-alt1
- built for ALT Linux
- desktop file and package description borrowed from Debian
- had to kludge down install due to "directory traversal" attempts

[-- Attachment #3: pdfedit.desktop --]
[-- Type: text/plain, Size: 226 bytes --]

[Desktop Entry]
Encoding=UTF-8
Name=PDF Editor
Comment=PDF Editor
Exec=pdfedit
Icon=/usr/share/pdfedit/icon/pdfedit_logo.png
Type=Application
StartupNotify=false
Terminal=false
Categories=PDFEditor;PDFViewer;Viewer;Graphics;


             reply	other threads:[~2007-03-18 22:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-18 22:27 Michael Shigorin [this message]
2007-03-18 22:35 ` Andrey Rahmatullin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070318222753.GR13731@osdn.org.ua \
    --to=mike@osdn.org.ua \
    --cc=shigorin@gmail.com \
    --cc=sisyphus@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git