* [devel] NMU: cdrecord
@ 2004-12-12 21:56 Konstantin A. Lepikhov
2004-12-12 22:18 ` [devel] " Konstantin A. Lepikhov
2004-12-13 10:49 ` [devel] " Dmitry V. Levin
0 siblings, 2 replies; 9+ messages in thread
From: Konstantin A. Lepikhov @ 2004-12-12 21:56 UTC (permalink / raw)
To: ALT Linux Devel Mailing List
[-- Attachment #1.1: Type: text/plain, Size: 301 bytes --]
Hi!
у ldv@ есть желание сделать это в Сизиф/updates?
--
WBR, Konstantin chat with ==>ICQ: 109916175
Lepikhov, speak to ==>JID: lakostis@jabber.org
aka L.A. Kostis write to ==>mailto:lakostis@pisem.net.nospam
...The information is like the bank... (c) EC8OR
[-- Attachment #1.2: Type: message/rfc822, Size: 12211 bytes --]
[-- Attachment #1.2.1.1.1.1: Type: text/plain, Size: 842 bytes --]
Hi Alexey!
Sunday 12, at 03:45:50 PM you wrote:
> On Fri, Dec 10, 2004 at 11:24:16PM +0200, Aleksandr Blokhin wrote:
> > >Да. Т.е. не пишет. Т.е. xcdroast тоже не пишет. k3b пишет через cdrdao,
> > >если увидит резак.
> > И cdrecord и xcdroast пишут, но при запуске либо через sudo либо su -c.
> > Можно пересобрать xcdroast без --disable-nonrootmode, но это не секурное
> > решение.
> Для cdrecord, вроде, уже есть патч. http://kerneltrap.org/node/view/4022
>
> Попробуйте кто-нибудь, а?
попробовал, работает. Прикладываю diff для spec (я туда еще rscsi добавил)
+ патч для a37
--
WBR, Konstantin chat with ==>ICQ: 109916175
Lepikhov, speak to ==>JID: lakostis@jabber.org
aka L.A. Kostis write to ==>mailto:lakostis@pisem.net.nospam
...The information is like the bank... (c) EC8OR
[-- Attachment #1.2.1.1.1.2: cdrtools.spec.diff --]
[-- Type: text/plain, Size: 1396 bytes --]
--- cdrtools.spec~ 2004-08-24 16:13:41 +0400
+++ cdrtools.spec 2004-12-12 21:01:01 +0300
@@ -1,7 +1,7 @@
%define cdr_major 2.01
%define iso_major 2.01
%define minor a37
-%define alt_rel alt1
+%define alt_rel alt2
Name: cdrtools
Version: %cdr_major
@@ -25,6 +25,7 @@
Patch3: %name-1.9-alt-manlocation.patch
Patch4: %name-2.01a29-alt-undepcfg.patch
Patch5: %name-2.01-alt-rcmdrsh.patch
+Patch6: %name-2.01a37-skipcheck_priv.patch
BuildConflicts: %name-devel
@@ -134,6 +135,7 @@
%patch1 -p0
%patch2 -p1
%patch3 -p1
+%patch6 -p1
find -type f -print0 |
xargs -r0 %__grep -EZl '/etc/default/(cdrecord|rscsi|cdda2ogg)' -- |
@@ -222,11 +224,13 @@
%files -n cdrecord
%attr(640,root,cdwriter) %config(noreplace) %_sysconfdir/cdrecord.conf
+%attr(640,root,cdwriter) %config(noreplace) %_sysconfdir/rscsi.conf
%_bindir/cdrecord
%_bindir/readcd
%_bindir/scgcheck
%_bindir/devdump
%_bindir/iso*
+%_sbindir/rscsi
%_man1dir/cdrecord.*
%_man1dir/readcd.*
%_man1dir/scgcheck.*
@@ -243,6 +247,10 @@
%docdir/cdda2wav
%changelog
+* Sun Dec 12 2004 LAKostis <lakostis at altlinux.ru> 5:2.01-alt2a37
+- add rscsi to cdrecord package.
+- add patch for linux kernel >= 2.6.8.1 compatability.
+
* Tue Aug 24 2004 Dmitry V. Levin <ldv@altlinux.org> 5:2.01-alt1a37
- Updated to 2.01a37.
- Moved control files to separate package.
[-- Attachment #1.2.1.1.1.3: cdrtools-2.01a37-skipcheck_priv.patch --]
[-- Type: text/plain, Size: 1652 bytes --]
--- cdrtools-2.01a37/cdrecord/cdrecord.c~ 2004-12-12 20:38:26 +0300
+++ cdrtools-2.01a37/cdrecord/cdrecord.c 2004-12-12 20:58:26 +0300
@@ -466,8 +466,10 @@ main(ac, av)
/*
* XXX Below this point we do not need root privilleges anymore.
*/
+ /* XXX Quick'n'dirty hack for linux kernel >= 2.6.8.1 compatability
if (geteuid() != getuid()) { /* AIX does not like to do this */
/* If we are not root */
+ /*
#ifdef HAVE_SETREUID
if (setreuid(-1, getuid()) < 0)
#else
@@ -479,6 +481,8 @@ main(ac, av)
#endif
comerr("Panic cannot set back effective uid.\n");
}
+ */
+
/*
* WARNING: We now are no more able to do any privilleged operation
* unless we have been called by root.
@@ -983,10 +987,12 @@ if (lverbose > 2)
* even on OS that do not support getreuid() which is *BSD
* and SUSv3 only.
*/
+ /* XXX Quick'n'dirty hack for linux kernel >= 2.6.8.1 compatability
if (oeuid != getuid()) {
if (setreuid(-1, oeuid) < 0)
errmsg("Could set back effective uid.\n");
}
+ */
#endif
/*
* fork() here to start the extra process needed for
@@ -1001,11 +1007,13 @@ if (lverbose > 2)
/*
* XXX Below this point we never need root privilleges anymore.
*/
+ /* XXX Quick'n'dirty hack for linux kernel >= 2.6.8.1 compatability
if (geteuid() != getuid()) { /* AIX does not like to do this */
/* If we are not root */
- if (setreuid(-1, getuid()) < 0)
+ /* if (setreuid(-1, getuid()) < 0)
comerr("Panic cannot set back effective uid.\n");
}
+ */
#endif
}
if ((*dp->cdr_set_speed_dummy)(scgp, dp, &speed) < 0) {
[-- Attachment #1.2.1.1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 2212 bytes --]
[-- Attachment #1.2.1.2: Type: text/plain, Size: 143 bytes --]
_______________________________________________
Sisyphus mailing list
Sisyphus@altlinux.ru
https://lists.altlinux.ru/mailman/listinfo/sisyphus
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 2212 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [devel] Re: NMU: cdrecord
2004-12-12 21:56 [devel] NMU: cdrecord Konstantin A. Lepikhov
@ 2004-12-12 22:18 ` Konstantin A. Lepikhov
2004-12-12 23:05 ` Konstantin A. Lepikhov
2004-12-13 10:49 ` [devel] " Dmitry V. Levin
1 sibling, 1 reply; 9+ messages in thread
From: Konstantin A. Lepikhov @ 2004-12-12 22:18 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1.1: Type: text/plain, Size: 404 bytes --]
Hi Konstantin!
Monday 13, at 12:56:03 AM you wrote:
> Hi!
>
> у ldv@ есть желание сделать это в Сизиф/updates?
>
в дополнение - и cdrtools-control
--
WBR, Konstantin chat with ==>ICQ: 109916175
Lepikhov, speak to ==>JID: lakostis@jabber.org
aka L.A. Kostis write to ==>mailto:lakostis@pisem.net.nospam
...The information is like the bank... (c) EC8OR
[-- Attachment #1.2: cdrtools-control.spec.diff --]
[-- Type: text/plain, Size: 871 bytes --]
--- cdrtools-control.spec~ 2004-10-02 02:58:14 +0400
+++ cdrtools-control.spec 2004-12-13 01:15:15 +0300
@@ -1,6 +1,6 @@
Name: cdrtools-control
Version: 1.1
-Release: alt1
+Release: alt1.1
Summary: Facilities control for CD/DVD media tools
License: GPL
@@ -17,15 +17,20 @@
See control(8) for details.
%install
-for n in cdrecord readcd; do
+for n in cdrecord readcd rscsi; do
%__install -pD -m755 %SOURCE0 "$RPM_BUILD_ROOT%_controldir/$n"
%__subst -p "s/@NAME@/$n/" "$RPM_BUILD_ROOT%_controldir/$n"
done
+# rscsi lives in sbin
+%__subst -p "s/\/bin(?=\/rscsi)/\/sbin/" "$RPM_BUILD_ROOT%_controldir/rscsi"
%files
%config %_controldir/*
%changelog
+* Mon Dec 13 2004 LAKostis <lakostis at altlinux.ru> 1.1-alt1.1
+- Added rscsi control.
+
* Sat Oct 02 2004 Dmitry V. Levin <ldv@altlinux.org> 1.1-alt1
- Added help.
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 2212 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [devel] NMU: cdrecord
2004-12-12 21:56 [devel] NMU: cdrecord Konstantin A. Lepikhov
2004-12-12 22:18 ` [devel] " Konstantin A. Lepikhov
@ 2004-12-13 10:49 ` Dmitry V. Levin
2004-12-13 10:57 ` [devel] " Konstantin A. Lepikhov
1 sibling, 1 reply; 9+ messages in thread
From: Dmitry V. Levin @ 2004-12-13 10:49 UTC (permalink / raw)
To: ALT Linux Devel Mailing List
[-- Attachment #1: Type: text/plain, Size: 1925 bytes --]
On Mon, Dec 13, 2004 at 12:56:03AM +0300, Konstantin A. Lepikhov wrote:
> у ldv@ есть желание сделать это в Сизиф/updates?
Нет, это же 2.6-only change:
> --- cdrtools-2.01a37/cdrecord/cdrecord.c~ 2004-12-12 20:38:26 +0300
> +++ cdrtools-2.01a37/cdrecord/cdrecord.c 2004-12-12 20:58:26 +0300
> @@ -466,8 +466,10 @@ main(ac, av)
> /*
> * XXX Below this point we do not need root privilleges anymore.
> */
> + /* XXX Quick'n'dirty hack for linux kernel >= 2.6.8.1 compatability
> if (geteuid() != getuid()) { /* AIX does not like to do this */
> /* If we are not root */
> + /*
> #ifdef HAVE_SETREUID
> if (setreuid(-1, getuid()) < 0)
> #else
> @@ -479,6 +481,8 @@ main(ac, av)
> #endif
> comerr("Panic cannot set back effective uid.\n");
> }
> + */
> +
> /*
> * WARNING: We now are no more able to do any privilleged operation
> * unless we have been called by root.
> @@ -983,10 +987,12 @@ if (lverbose > 2)
> * even on OS that do not support getreuid() which is *BSD
> * and SUSv3 only.
> */
> + /* XXX Quick'n'dirty hack for linux kernel >= 2.6.8.1 compatability
> if (oeuid != getuid()) {
> if (setreuid(-1, oeuid) < 0)
> errmsg("Could set back effective uid.\n");
> }
> + */
> #endif
> /*
> * fork() here to start the extra process needed for
> @@ -1001,11 +1007,13 @@ if (lverbose > 2)
> /*
> * XXX Below this point we never need root privilleges anymore.
> */
> + /* XXX Quick'n'dirty hack for linux kernel >= 2.6.8.1 compatability
> if (geteuid() != getuid()) { /* AIX does not like to do this */
> /* If we are not root */
> - if (setreuid(-1, getuid()) < 0)
> + /* if (setreuid(-1, getuid()) < 0)
> comerr("Panic cannot set back effective uid.\n");
> }
> + */
> #endif
> }
> if ((*dp->cdr_set_speed_dummy)(scgp, dp, &speed) < 0) {
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [devel] Re: NMU: cdrecord
2004-12-13 10:49 ` [devel] " Dmitry V. Levin
@ 2004-12-13 10:57 ` Konstantin A. Lepikhov
2004-12-13 11:02 ` Dmitry V. Levin
0 siblings, 1 reply; 9+ messages in thread
From: Konstantin A. Lepikhov @ 2004-12-13 10:57 UTC (permalink / raw)
To: ALT Devel discussion list
Hi Dmitry!
Monday 13, at 01:49:17 PM you wrote:
> On Mon, Dec 13, 2004 at 12:56:03AM +0300, Konstantin A. Lepikhov wrote:
> > у ldv@ есть желание сделать это в Сизиф/updates?
>
> Нет, это же 2.6-only change:
>
OK а если я сделаю обвязку на kernel_version?
--
WBR, Konstantin chat with ==>ICQ: 109916175
Lepikhov, speak to ==>JID: lakostis@jabber.org
aka L.A. Kostis write to ==>mailto:lakostis@pisem.net.nospam
...The information is like the bank... (c) EC8OR
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [devel] Re: NMU: cdrecord
2004-12-13 10:57 ` [devel] " Konstantin A. Lepikhov
@ 2004-12-13 11:02 ` Dmitry V. Levin
2004-12-13 14:37 ` Konstantin A. Lepikhov
0 siblings, 1 reply; 9+ messages in thread
From: Dmitry V. Levin @ 2004-12-13 11:02 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 296 bytes --]
On Mon, Dec 13, 2004 at 01:57:39PM +0300, Konstantin A. Lepikhov wrote:
> > > у ldv@ есть желание сделать это в Сизиф/updates?
> >
> > Нет, это же 2.6-only change:
> >
> OK а если я сделаю обвязку на kernel_version?
Тогда можете взять переходящий флаг мантейнера пакета.
--
ldv
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [devel] Re: NMU: cdrecord
2004-12-13 11:02 ` Dmitry V. Levin
@ 2004-12-13 14:37 ` Konstantin A. Lepikhov
2004-12-13 15:36 ` Sergey Vlasov
0 siblings, 1 reply; 9+ messages in thread
From: Konstantin A. Lepikhov @ 2004-12-13 14:37 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1.1: Type: text/plain, Size: 671 bytes --]
Hi Dmitry!
Monday 13, at 02:02:17 PM you wrote:
> On Mon, Dec 13, 2004 at 01:57:39PM +0300, Konstantin A. Lepikhov wrote:
> > > > у ldv@ есть желание сделать это в Сизиф/updates?
> > >
> > > Нет, это же 2.6-only change:
> > >
> > OK а если я сделаю обвязку на kernel_version?
>
> Тогда можете взять переходящий флаг мантейнера пакета.
Никто не против такого патча? Если нет, я выкладываю в Сизиф и
backports
--
WBR, Konstantin chat with ==>ICQ: 109916175
Lepikhov, speak to ==>JID: lakostis@jabber.org
aka L.A. Kostis write to ==>mailto:lakostis@pisem.net.nospam
...The information is like the bank... (c) EC8OR
[-- Attachment #1.2: cdrtools-2.01a37-skipcheck_priv.patch --]
[-- Type: text/plain, Size: 2689 bytes --]
--- cdrtools-2.01a37/cdrecord/cdrecord.c.skipcheck_priv 2004-12-13 14:45:02 +0300
+++ cdrtools-2.01a37/cdrecord/cdrecord.c 2004-12-13 14:52:03 +0300
@@ -242,7 +242,7 @@ LOCAL void print_drflags __PR((cdr_t *dp
LOCAL void print_wrmodes __PR((cdr_t *dp));
LOCAL BOOL check_wrmode __PR((cdr_t *dp, int wmode, int tflags));
LOCAL void set_wrmode __PR((cdr_t *dp, int wmode, int tflags));
-LOCAL void linuxcheck __PR((void));
+LOCAL BOOL linuxcheck __PR((void));
struct exargs {
SCSI *scgp;
@@ -465,8 +465,10 @@ main(ac, av)
}
/*
* XXX Below this point we do not need root privilleges anymore.
+ *
+ * XXX Skip this on Linux kernel >= 2.6.9
*/
- if (geteuid() != getuid()) { /* AIX does not like to do this */
+ if (geteuid() != getuid() && !linuxcheck()) { /* AIX does not like to do this */
/* If we are not root */
#ifdef HAVE_SETREUID
if (setreuid(-1, getuid()) < 0)
@@ -982,8 +984,10 @@ if (lverbose > 2)
* Note that we need to find a more general way that works
* even on OS that do not support getreuid() which is *BSD
* and SUSv3 only.
+ *
+ * XXX Skip this on Linux kernel >= 2.6.9
*/
- if (oeuid != getuid()) {
+ if (oeuid != getuid() && !linuxcheck()) {
if (setreuid(-1, oeuid) < 0)
errmsg("Could set back effective uid.\n");
}
@@ -1000,8 +1004,10 @@ if (lverbose > 2)
#if defined(USE_POSIX_PRIORITY_SCHEDULING) && defined(HAVE_SETREUID)
/*
* XXX Below this point we never need root privilleges anymore.
+ *
+ * XXX Skip this on Linux kernel >= 2.6.9
*/
- if (geteuid() != getuid()) { /* AIX does not like to do this */
+ if (geteuid() != getuid() && !linuxcheck()) { /* AIX does not like to do this */
/* If we are not root */
if (setreuid(-1, getuid()) < 0)
comerr("Panic cannot set back effective uid.\n");
@@ -4619,3 +4625,34 @@ set_wrmode(dp, wmode, tflags)
}
dsp->ds_wrmode = WM_NONE;
}
+/*
+ * Kludge for checking linux kernel version
+ * enabling this hack only for >= 2.6.9 kernel
+ *
+ */
+#if defined(linux) || defined(__linux) || defined(__linux__)
+#ifdef HAVE_UNAME
+#include <sys/utsname.h>
+#endif
+#endif
+
+LOCAL BOOL
+linuxcheck()
+{
+#if defined(linux) || defined(__linux) || defined(__linux__)
+#ifdef HAVE_UNAME
+ struct utsname un;
+ if (uname(&un) >= 0) {
+ if ((un.release[0] == '2' && un.release[1] == '.') &&
+ (un.release[2] == '6' && un.release[3] >= 9)) {
+ errmsgno(EX_BAD,
+ "Warning: Running on Linux-%s\n", un.release);
+ errmsgno(EX_BAD,
+ "Enabling compatability hack!\n");
+ return (TRUE);
+ }
+ }
+#endif
+ return (FALSE);
+#endif
+}
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 2212 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [devel] Re: NMU: cdrecord
2004-12-13 14:37 ` Konstantin A. Lepikhov
@ 2004-12-13 15:36 ` Sergey Vlasov
2004-12-13 16:48 ` Konstantin A. Lepikhov
0 siblings, 1 reply; 9+ messages in thread
From: Sergey Vlasov @ 2004-12-13 15:36 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 355 bytes --]
On Mon, Dec 13, 2004 at 05:37:04PM +0300, Konstantin A. Lepikhov wrote:
> Никто не против такого патча? Если нет, я выкладываю в Сизиф и
> backports
> + if ((un.release[0] == '2' && un.release[1] == '.') &&
> + (un.release[2] == '6' && un.release[3] >= 9)) {
Здесь очевидная ошибка (такая проверка выдаст TRUE фактически на любом
2.6.x).
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [devel] Re: NMU: cdrecord
2004-12-13 15:36 ` Sergey Vlasov
@ 2004-12-13 16:48 ` Konstantin A. Lepikhov
0 siblings, 0 replies; 9+ messages in thread
From: Konstantin A. Lepikhov @ 2004-12-13 16:48 UTC (permalink / raw)
To: ALT Devel discussion list
[-- Attachment #1: Type: text/plain, Size: 807 bytes --]
Hi Sergey!
Monday 13, at 06:36:16 PM you wrote:
> On Mon, Dec 13, 2004 at 05:37:04PM +0300, Konstantin A. Lepikhov wrote:
> > Никто не против такого патча? Если нет, я выкладываю в Сизиф и
> > backports
>
> > + if ((un.release[0] == '2' && un.release[1] == '.') &&
> > + (un.release[2] == '6' && un.release[3] >= 9)) {
>
> Здесь очевидная ошибка (такая проверка выдаст TRUE фактически на любом
> 2.6.x).
заменил на ((un.release[0] == '2' && un.release[1] == '.' && un.release[2]
== '6') && (un.release[3] == '.' && un.release[4] >= '9'))
--
WBR, Konstantin chat with ==>ICQ: 109916175
Lepikhov, speak to ==>JID: lakostis@jabber.org
aka L.A. Kostis write to ==>mailto:lakostis@pisem.net.nospam
...The information is like the bank... (c) EC8OR
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 2212 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-12-13 16:48 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-12 21:56 [devel] NMU: cdrecord Konstantin A. Lepikhov
2004-12-12 22:18 ` [devel] " Konstantin A. Lepikhov
2004-12-12 23:05 ` Konstantin A. Lepikhov
2004-12-13 10:49 ` [devel] " Dmitry V. Levin
2004-12-13 10:57 ` [devel] " Konstantin A. Lepikhov
2004-12-13 11:02 ` Dmitry V. Levin
2004-12-13 14:37 ` Konstantin A. Lepikhov
2004-12-13 15:36 ` Sergey Vlasov
2004-12-13 16:48 ` Konstantin A. Lepikhov
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/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 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git