Re: [DNG] PAM usage (Was: Giving Devuan sans-initramfs capabilities)

2016-01-06 Thread karl
Teodoro Santoni:
...
> I'm asking if someone use PAMs daily, because I suspect that I can
> answer "patch any kind of strange permission code away, everywhere"
> to the "how can I waste my time and work happily with Linux OSes
> installed on my pc without any trace of systemd code but have cups
> and other goodies?" question.

More like, how can I avoid things that people with good intentions push 
on me so I have to waste my time and work to work around it...

Avoids cups, don't give me anything than making the actual processing 
hidden and obscure.

> And was curious about your experience, hence the thread.

Soo, any conclutions ?

Regards,
/Karl Hammar

---
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Giving Devuan sans-initramfs capabilities

2016-01-06 Thread karl
Daniel Reurich:
> On 06/01/16 07:55, k...@aspodata.se wrote:
> > Rainer Weikusat:
> > ...
> >> The sensible way to handle this is really "the distribution ships a
> >> kernel which optionally supports everything" (via aggressive
> >> modularization) and people who think they want/ need more control over
> >> this part of the system can change that as they see fit (by compiling a
> >> custom kernel). Insofar someone feels his custom kernel is of more
> >> general use than just "run on this machine", the configuration could be
> >> shared via internet. It's even failrly easy to share the kernel itself:
> >> I posted a script I've been using since 1998 to build kernels for
> >> different machines on a dedicated one and for someone who likes "shot
> >> from behind trough the chest right into the eye" constructions, there's
> >> always kernel-package for creating custom-kernel Debian packages.
> > 
> > Building the kernel is easy, tools are provided (later kernels have a 
> > deb-pkg target), choosing configuration is the hard part.
> > 
> > Would it be sensible for devuan to set up a user contrib site where one 
> > can upload kerlnels and or configs, together with reasons why that 
> > config is choosen ?
> > 
> Sure, how about talk.devuan.org

kernel.devuan.org ?

Though it will depend of if and who will set it up.

Regards,
/Karl Hammar

---
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-autostart_0.1.1

2016-01-06 Thread aitor_czr

Hi Edward,

On 01/06/2016 08:10 AM, Edward Bartolo wrote:

Hi,

Since I received no replies I will attempt a manual edit of
netman-gui.postinst keeping debconf-41822e0-27.12.2015.patch as a
guide. Trying to persuade the patching software to accept the patch is
more likely to be time consuming, therefore, I am opting to do a
manual edit.

Edward


The changes in your Makefile are just applied, so Rainer's patch is not 
valid for you.


   Aitor.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Giving Devuan sans-initramfs capabilities

2016-01-06 Thread aitor_czr

On 01/06/2016 10:10 AM, Daniel Reurich  wrote:

choosing configuration is the hard part.


You are right :)

-- Aitor.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-autostart_0.1.1

2016-01-06 Thread aitor_czr

Hi Edward,

On 05/01/2016, Edward Bartolo  wrote:

Hi Aitor,

Sorry for taking so long to resume work on netman. At the moment I am
trying to apply your netman debconf patch. However, git apply --index
../aitor/debconf-41822e0-27.12.2015.patch is failing complaining that:

../aitor/debconf-41822e0-27.12.2015.patch:10: trailing whitespace.
#!/bin/sh -e
../aitor/debconf-41822e0-27.12.2015.patch:23: trailing whitespace.
. /usr/share/debconf/confmodule
../aitor/debconf-41822e0-27.12.2015.patch:33: trailing whitespace.
db_version 2.0
../aitor/debconf-41822e0-27.12.2015.patch:34: trailing whitespace.
#db_capb backup
../aitor/debconf-41822e0-27.12.2015.patch:35: trailing whitespace.
db_capb escape
error: patch failed: debian/netman-gui.postinst:1
error: debian/netman-gui.postinst: patch does not apply

What is wrong? I opened the patch with medit to view the offending
characters. In case understanding the cause of this issue an unjustied
long time, I can always apply the patch manually by editing text
directly.

Edward


 *trailing whitespace*

I think there are white spaces in the patch, instead of tab keys.

As Rainer said, copy 'n' paste is not always valid.

   Aitor.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-autostart_0.1.1

2016-01-06 Thread Svante Signell
On Wed, 2016-01-06 at 12:22 +0100, aitor_czr wrote:
> Hi Edward,
> 
> 
> > What is wrong? I opened the patch with medit to view the offending
> > characters. In case understanding the cause of this issue an unjustied
> > long time, I can always apply the patch manually by editing text
> > directly.
> > 
> > Edward
> > 
>  *trailing whitespace*
> 
> I think there are white spaces in the patch, instead of tab keys.
> As Rainer said, copy 'n' paste is not always valid.

In emacs
-x
delete-trailing-whitespace
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Giving Devuan sans-initramfs capabilities

2016-01-06 Thread karl
Aitor:
> On 01/06/2016 10:10 AM, Daniel Reurich  wrote:
> > choosing configuration is the hard part.
> You are right :)

So then, it's there we should share our knowledge.

Regards,
/Karl Hammar

---
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-autostart_0.1.1

2016-01-06 Thread Edward Bartolo
Hi Aitor,

I am trying to add your latest netman patch so that users would be
able to choose how to start and configure netman. I manually applied
your netman-gui.postinst patch. The .deb packages thus produced do
install but /usr/share/applications/netman.desktop is not created.

What is wrong? I beg your pardon for asking questions.

Edward


netman-gui.postinst
Description: Binary data
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-autostart_0.1.1

2016-01-06 Thread Edward Bartolo
Hi Aitor,

Netman succeeded to autostart and autoconnect even though
/usr/share/applications/ does not contain the netman.desktop file.

However, dpkg-reconfigure netman-gui fails with the complaint:

root@edbarx-pc:/home/edbarx# dpkg-reconfigure netman-gui
mv: cannot stat ‘/usr/share/applications/netman.desktop’: No such file
or directory

Edward


On 06/01/2016, Edward Bartolo  wrote:
> Hi Aitor,
>
> I am trying to add your latest netman patch so that users would be
> able to choose how to start and configure netman. I manually applied
> your netman-gui.postinst patch. The .deb packages thus produced do
> install but /usr/share/applications/netman.desktop is not created.
>
> What is wrong? I beg your pardon for asking questions.
>
> Edward
>
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-autostart_0.1.1

2016-01-06 Thread Edward Bartolo
Hi Aitor,

I replaced my version of debian/netman-gui.postinst by your version
and still I am getting the same behaviour. If after installing netman
I use dpkg-reconfigure it fails with the same error.

mv: cannot stat ‘/usr/share/applications/netman.desktop’: No such file
or directory

Edward


On 06/01/2016, Edward Bartolo  wrote:
> Hi Aitor,
>
> Netman succeeded to autostart and autoconnect even though
> /usr/share/applications/ does not contain the netman.desktop file.
>
> However, dpkg-reconfigure netman-gui fails with the complaint:
>
> root@edbarx-pc:/home/edbarx# dpkg-reconfigure netman-gui
> mv: cannot stat ‘/usr/share/applications/netman.desktop’: No such file
> or directory
>
> Edward
>
>
> On 06/01/2016, Edward Bartolo  wrote:
>> Hi Aitor,
>>
>> I am trying to add your latest netman patch so that users would be
>> able to choose how to start and configure netman. I manually applied
>> your netman-gui.postinst patch. The .deb packages thus produced do
>> install but /usr/share/applications/netman.desktop is not created.
>>
>> What is wrong? I beg your pardon for asking questions.
>>
>> Edward
>>
>
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] Netman debugging of installation scripts.

2016-01-06 Thread Edward Bartolo
Hi Aitor,

I 'git pushed' all my remaining local commits to netman. For an
ordinary installation involving autostarting and autoconnecting,
netman works as intended. However, using dpkg-reconfigure netman-gui
to change settings results in unexpected results like netman-gui
autostarting when it is set not to autostart. This means more
debugging is necessary.

Edward
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-autostart_0.1.1

2016-01-06 Thread Edward Bartolo
Hi,

Maybe, this can shed some light on what is causing this problem. The
first time dpkg-reconfigure is used on netman-gui it doesn't exit
complaining the netman.desktop file is not found. This may mean the
netman.desktop file is being deleted by a script called by
dpkg-reconfigure, maybe, netman-gui.postinst?

Edward

On 06/01/2016, Edward Bartolo  wrote:
> Hi Aitor,
>
> I replaced my version of debian/netman-gui.postinst by your version
> and still I am getting the same behaviour. If after installing netman
> I use dpkg-reconfigure it fails with the same error.
>
> mv: cannot stat ‘/usr/share/applications/netman.desktop’: No such file
> or directory
>
> Edward
>
>
> On 06/01/2016, Edward Bartolo  wrote:
>> Hi Aitor,
>>
>> Netman succeeded to autostart and autoconnect even though
>> /usr/share/applications/ does not contain the netman.desktop file.
>>
>> However, dpkg-reconfigure netman-gui fails with the complaint:
>>
>> root@edbarx-pc:/home/edbarx# dpkg-reconfigure netman-gui
>> mv: cannot stat ‘/usr/share/applications/netman.desktop’: No such file
>> or directory
>>
>> Edward
>>
>>
>> On 06/01/2016, Edward Bartolo  wrote:
>>> Hi Aitor,
>>>
>>> I am trying to add your latest netman patch so that users would be
>>> able to choose how to start and configure netman. I manually applied
>>> your netman-gui.postinst patch. The .deb packages thus produced do
>>> install but /usr/share/applications/netman.desktop is not created.
>>>
>>> What is wrong? I beg your pardon for asking questions.
>>>
>>> Edward
>>>
>>
>
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Netman debugging of installation scripts.

2016-01-06 Thread Edward Bartolo
Hi,

Maybe, this can shed some light on what is causing this problem. The
first time dpkg-reconfigure is used on netman-gui it does NOT exit
complaining the netman.desktop file is not found. This may mean the
netman.desktop file is being deleted by a script called by
dpkg-reconfigure, maybe, netman-gui.postinst?

Edward

On 06/01/2016, Edward Bartolo  wrote:
> Hi Aitor,
>
> I 'git pushed' all my remaining local commits to netman. For an
> ordinary installation involving autostarting and autoconnecting,
> netman works as intended. However, using dpkg-reconfigure netman-gui
> to change settings results in unexpected results like netman-gui
> autostarting when it is set not to autostart. This means more
> debugging is necessary.
>
> Edward
>
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-autostart_0.1.1

2016-01-06 Thread Rainer Weikusat
Edward Bartolo  writes:
> Maybe, this can shed some light on what is causing this problem. The
> first time dpkg-reconfigure is used on netman-gui it doesn't exit
> complaining the netman.desktop file is not found. This may mean the
> netman.desktop file is being deleted by a script called by
> dpkg-reconfigure, maybe, netman-gui.postinst?

2) db_get netman-gui/netman-autostart
if [ "$RET" = "true" ]; then
file="/etc/xdg/autostart/netman.desktop";
mv /usr/share/applications/netman.desktop 
/etc/xdg/autostart/
fi  
;;

This moves the /usr/share/applications/netman.desktop file to
/etc/xdg/autostart, consequently, /usr/share/applications/netman.desktop
doesn't exist anymore afterwards. And it doesn't do anything in order to
disable autostartf if $RET is not true. If the /etc/xdg/autostart file
is not supposed to be modified, I suggest creating a symlink instead, ie

ln -s /usr/share/applications/netman.desktop /etc/xdg/autostart/

You could also use cp instead of mv so that the autostart file will be a
copy of the original.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] PAM usage (Was: Giving Devuan sans-initramfs capabilities)

2016-01-06 Thread Teodoro Santoni
Good afternoon,

2016-01-06 10:09 GMT+01:00, k...@aspodata.se :
> More like, how can I avoid things that people with good intentions push
> on me so I have to waste my time and work to work around it...

Yeah.

> Avoids cups, don't give me anything than making the actual processing
> hidden and obscure.

PAM is a problem, the cups behaviour is another.
My problem is to run things as, for example, my cheap
hp printer without systemd.
Next may come hplip through lprng or lpr.
I talk about my printer but dunno, may run wayland someday, or
have my family scavenge for money spending on e-commerce
through google-chrome.
I personally don't use any of those, but without pam, a life
without systemd seem much easier.
Maybe I'm wrong.

>> And was curious about your experience, hence the thread.
>
> Soo, any conclutions ?

The thread is two days old.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] upgrade to devuan

2016-01-06 Thread Vicente Vera
Hi,

Yes, I follow you. Now that I remember about this thread, I just
closed an issue opened in this package repository that was based on my
previous bogus interpretation. Thanks for the reminder ;>

2016-01-05 8:24 GMT-03:00 aitor_czr :
> Hi Vicente,
>
> On 01/05/2016 10:58 AM, Vicente Vera  wrote:
>
> AFAIK installing devuan-baseconf_0.6.4+devuan1_all.deb is pretty much
> the same as modifying sources.list by hand. I chose 0.6.4+devuan1
> because--correct me if I'm wrong:
>
> 0.6.4+devuan1 = jessie
> 0.6.4+devuan2 = ascii
> 0.6.4+devuan3 = ceres
>
> Thanks
>
>
> I don't think so...
>
> Increasing from devuan1 to devuan2 means changes in the debian branch of the
> package (instead of the upstream branch, i.e. the sources). So, different
> versions of the package don't belong *necessarily* to different releases of
> the system.
>
> Cheers,
>
> Aitor.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-autostart_0.1.1

2016-01-06 Thread Edward Bartolo
Hi Rainer,

I edited the netman-gui.postinst script. I am attaching it to this
email as I am not an experienced bash script programmer. You can view
it in the attachment.

netman GUI use --no-tray-icon  and --auto-conn parameters. If
--no-tray-icon is used netman GUI does not use a tray icon.
Autoconnecting is enabled if --auto-conn is used as a parameter,
otherwise autoconnecting is disabled.

Edward


On 06/01/2016, Rainer Weikusat  wrote:
> Edward Bartolo  writes:
>> Maybe, this can shed some light on what is causing this problem. The
>> first time dpkg-reconfigure is used on netman-gui it doesn't exit
>> complaining the netman.desktop file is not found. This may mean the
>> netman.desktop file is being deleted by a script called by
>> dpkg-reconfigure, maybe, netman-gui.postinst?
>
> 2) db_get netman-gui/netman-autostart
> if [ "$RET" = "true" ]; then
> file="/etc/xdg/autostart/netman.desktop";
> mv /usr/share/applications/netman.desktop
> /etc/xdg/autostart/
> fi
> ;;
>
> This moves the /usr/share/applications/netman.desktop file to
> /etc/xdg/autostart, consequently, /usr/share/applications/netman.desktop
> doesn't exist anymore afterwards. And it doesn't do anything in order to
> disable autostartf if $RET is not true. If the /etc/xdg/autostart file
> is not supposed to be modified, I suggest creating a symlink instead, ie
>
> ln -s /usr/share/applications/netman.desktop /etc/xdg/autostart/
>
> You could also use cp instead of mv so that the autostart file will be a
> copy of the original.
>
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>


netman-gui.postinst
Description: Binary data
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-autostart_0.1.1

2016-01-06 Thread Edward Bartolo
Hi Rainer,

I did more edits to the netman-gui.postinst script as follows:


2) db_get netman-gui/netman-autostart
if [ "$RET" = "true" ]; then
file="/etc/xdg/autostart/netman.desktop";
cp /usr/share/applications/netman.desktop 
/etc/xdg/autostart/
else
if [ -f "/etc/xdg/autostart/netman.desktop" ]; then
rm /etc/xdg/autostart/netman.desktop
fi  
fi  
;;


However, using dpkg-reconfiguer netman-gui I get the error:

root@edbarx-pc:/home/edbarx# dpkg-reconfigure netman-gui
/var/lib/dpkg/info/netman-gui.postinst: 24:
/var/lib/dpkg/info/netman-gui.postinst: [-f: not found

I think this has to do with incorrect script syntax.

Any hints are greatly appreciated.

Edward

On 06/01/2016, Edward Bartolo  wrote:
> Hi Rainer,
>
> I edited the netman-gui.postinst script. I am attaching it to this
> email as I am not an experienced bash script programmer. You can view
> it in the attachment.
>
> netman GUI use --no-tray-icon  and --auto-conn parameters. If
> --no-tray-icon is used netman GUI does not use a tray icon.
> Autoconnecting is enabled if --auto-conn is used as a parameter,
> otherwise autoconnecting is disabled.
>
> Edward
>
>
> On 06/01/2016, Rainer Weikusat  wrote:
>> Edward Bartolo  writes:
>>> Maybe, this can shed some light on what is causing this problem. The
>>> first time dpkg-reconfigure is used on netman-gui it doesn't exit
>>> complaining the netman.desktop file is not found. This may mean the
>>> netman.desktop file is being deleted by a script called by
>>> dpkg-reconfigure, maybe, netman-gui.postinst?
>>
>> 2) db_get netman-gui/netman-autostart
>> if [ "$RET" = "true" ]; then
>> file="/etc/xdg/autostart/netman.desktop";
>> mv /usr/share/applications/netman.desktop
>> /etc/xdg/autostart/
>> fi
>> ;;
>>
>> This moves the /usr/share/applications/netman.desktop file to
>> /etc/xdg/autostart, consequently, /usr/share/applications/netman.desktop
>> doesn't exist anymore afterwards. And it doesn't do anything in order to
>> disable autostartf if $RET is not true. If the /etc/xdg/autostart file
>> is not supposed to be modified, I suggest creating a symlink instead, ie
>>
>> ln -s /usr/share/applications/netman.desktop /etc/xdg/autostart/
>>
>> You could also use cp instead of mv so that the autostart file will be a
>> copy of the original.
>>
>> ___
>> Dng mailing list
>> Dng@lists.dyne.org
>> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>>
>
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-autostart_0.1.1

2016-01-06 Thread Rainer Weikusat
Edward Bartolo  writes:
>
> I did more edits to the netman-gui.postinst script as follows:
>
> 
> 2) db_get netman-gui/netman-autostart
>   if [ "$RET" = "true" ]; then
>   file="/etc/xdg/autostart/netman.desktop";
>   cp /usr/share/applications/netman.desktop 
> /etc/xdg/autostart/
>   else
>   if [ -f "/etc/xdg/autostart/netman.desktop" ]; then
>   rm /etc/xdg/autostart/netman.desktop
>   fi  
>   fi  
>   ;;
> 
>
> However, using dpkg-reconfiguer netman-gui I get the error:
>
> root@edbarx-pc:/home/edbarx# dpkg-reconfigure netman-gui
> /var/lib/dpkg/info/netman-gui.postinst: 24:
> /var/lib/dpkg/info/netman-gui.postinst: [-f: not found

The shell starts parsing something with splitting on unquoted whitespace
in order to turn the input into a sequence of 'words'. This means if
there's no whitespace between [ and -f, this won't end up invoking the
[ with an argument of -f but as [-f. Since the shell doesn't know
anything about that, it will try to run a program named [-f (which
doesn't exist).

The test can be omitted by using

rm -f ...

instead. Attempts to remove a file which doesn't exist then won't cause
rm to exist with an error status.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-autostart_0.1.1

2016-01-06 Thread Edward Bartolo
Hi Rainer,

Thanks so far. The netman-gui.postinst is adding the Exec= line
without removing the previous one. It is also doing the same thing
with the Comment= line.

Here is what netman.desktop looks like:

-
[Desktop Entry]
Categories=Application;Network;
Exec=netman
Exec=netman --auto-conn
Comment=Display network connection status in the system tray
Exec=netman --auto-conn
Comment=Display network connection status in the system tray
GenericName=Netman
Icon=netman
Name=Netman Network Manager
Comment=Start netman without system tray icon
Terminal=false
Type=Application
Categories=Network;


As you can see, it is corrupted. I have yet to determine why the
--no-tray-icon parameter is never added.

Edward

On 06/01/2016, Rainer Weikusat  wrote:
> Edward Bartolo  writes:
>>
>> I did more edits to the netman-gui.postinst script as follows:
>>
>> 
>> 2) db_get netman-gui/netman-autostart
>>  if [ "$RET" = "true" ]; then
>>  file="/etc/xdg/autostart/netman.desktop";
>>  cp /usr/share/applications/netman.desktop 
>> /etc/xdg/autostart/
>>  else
>>  if [ -f "/etc/xdg/autostart/netman.desktop" ]; then
>>  rm /etc/xdg/autostart/netman.desktop
>>  fi  
>>  fi  
>>  ;;
>> 
>>
>> However, using dpkg-reconfiguer netman-gui I get the error:
>>
>> root@edbarx-pc:/home/edbarx# dpkg-reconfigure netman-gui
>> /var/lib/dpkg/info/netman-gui.postinst: 24:
>> /var/lib/dpkg/info/netman-gui.postinst: [-f: not found
>
> The shell starts parsing something with splitting on unquoted whitespace
> in order to turn the input into a sequence of 'words'. This means if
> there's no whitespace between [ and -f, this won't end up invoking the
> [ with an argument of -f but as [-f. Since the shell doesn't know
> anything about that, it will try to run a program named [-f (which
> doesn't exist).
>
> The test can be omitted by using
>
> rm -f ...
>
> instead. Attempts to remove a file which doesn't exist then won't cause
> rm to exist with an error status.
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] PAM usage (Was: Giving Devuan sans-initramfs capabilities)

2016-01-06 Thread karl
Teodoro Santoni:
> 2016-01-06 10:09 GMT+01:00, k...@aspodata.se :
> > More like, how can I avoid things that people with good intentions push
> > on me so I have to waste my time and work to work around it...
> 
> Yeah.

Great, welcome to the club :)

> > Avoids cups, don't give me anything than making the actual processing
> > hidden and obscure.
> 
> PAM is a problem,

The only thing I've done with pam is
# cd /etc/pam.d
# diff login~ login
87c87
< sessionoptional   pam_motd.so  motd=/run/motd.dynamic
nnn---
> #sessionoptional   pam_motd.so  motd=/run/motd.dynamic

Removing pam would probably not affect me at all.
I guess pam was an attempt to centralize auth things, before pam it was 
ever daemon to its own. Useing pam doesn't hinder some daemon to ignore 
it, depending how it is written. So you have to check booth pam and 
daemon settings, it seems.

> the cups behaviour is another.
> My problem is to run things as, for example, my cheap
> hp printer without systemd.
> Next may come hplip through lprng or lpr.

Isn't printing about converting your ps/pdf file to some obscure format 
and dump it to port 9000 on printer, how hard could that be ?
Or even better just send your postscript to the printer.

> I talk about my printer but dunno, may run wayland someday, or
> have my family scavenge for money spending on e-commerce
> through google-chrome.
> I personally don't use any of those, but without pam, a life
> without systemd seem much easier.
> Maybe I'm wrong.
...

I wouldn't complain if pam goes, I currently don't care.

Regards,
/Karl Hammar

---
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] PAM usage (Was: Giving Devuan sans-initramfs capabilities)

2016-01-06 Thread Didier Kryn

Le 06/01/2016 17:13, Teodoro Santoni a écrit :

PAM is a problem, the cups behaviour is another.
My problem is to run things as, for example, my cheap
hp printer without systemd.
Next may come hplip through lprng or lpr.
I talk about my printer but dunno, may run wayland someday, or
have my family scavenge for money spending on e-commerce
through google-chrome.
I personally don't use any of those, but without pam, a life
without systemd seem much easier.
Maybe I'm wrong.


I'm having pam installed on my devuan-jessie-alpha2 and no systemd 
and no libpam-systemd. No problem.


Didier

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-autostart_0.1.1

2016-01-06 Thread aitor_czr

Hi Edward, Rainer

On 01/06/2016 04:58 PM, Edward Bartolo  wrote:

Maybe, this can shed some light on what is causing this problem. The
>first time dpkg-reconfigure is used on netman-gui it doesn't exit
>complaining the netman.desktop file is not found. This may mean the
>netman.desktop file is being deleted by a script called by
>dpkg-reconfigure, maybe, netman-gui.postinst?

 2) db_get netman-gui/netman-autostart
 if [ "$RET" = "true" ]; then
 file="/etc/xdg/autostart/netman.desktop";
 mv/usr/share/applications/netman.desktop 
/etc/xdg/autostart/
 fi
 ;;

This moves the /usr/share/applications/netman.desktop file to
/etc/xdg/autostart, consequently, /usr/share/applications/netman.desktop
doesn't exist anymore afterwards. And it doesn't do anything in order to
disable autostartf if $RET is not true. If the /etc/xdg/autostart file
is not supposed to be modified, I suggest creating a symlink instead, ie

ln -s/usr/share/applications/netman.desktop /etc/xdg/autostart/

You could also use cp instead of mv so that the autostart file will be a
copy of the original.



Sorry, today i had a family meal. Yes, this is what is causing the 
"problem": if the user prefers to autostart netman automaticaly, the 
script removes the launcher from xfce-applications.menu, 
lxde-applications.menu, etc... But i can change "mv" by "cp" if you 
prefer so.


Cheers,

   Aitor.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] PAM usage (Was: Giving Devuan sans-initramfs capabilities)

2016-01-06 Thread Didier Kryn

Le 06/01/2016 17:13, Teodoro Santoni a écrit :

>Avoids cups, don't give me anything than making the actual processing
>hidden and obscure.


Cups is a big black box for me, but this is not the only one 
(iceweasel, gcc, ssh...) . For sure it is not like an lpr client which 
you might craft in a few days, but the service it provides is superior. 
I have it running on my Devuan-jessie-alpha2 without systemd and it 
works fine; I print through an old Debian Squeeze or Lenny server.


Didier

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-autostart_0.1.1

2016-01-06 Thread Edward Bartolo
Hi Aitor,

Enjoy yourself, I am working on it. I think, I got a way of putting it
right. There are two .desktop files that control how netman gui
behaves:
a) /etc/xdg/autostart/netman.desktop
b) /usr/share/applications/netman.desktop

The netman-gui.postinst script has to modify both of them. If netman
is set not to start automatically /etc/xdg/autostart/netman.desktop
should be deleted. The sed command in the postinst script also has to
make sure no multiple Exec= and Comment= lines are added to both
.desktop files.

Edward


On 06/01/2016, aitor_czr  wrote:
> Hi Edward, Rainer
>
> On 01/06/2016 04:58 PM, Edward Bartolo  wrote:
>>> Maybe, this can shed some light on what is causing this problem. The
>>> >first time dpkg-reconfigure is used on netman-gui it doesn't exit
>>> >complaining the netman.desktop file is not found. This may mean the
>>> >netman.desktop file is being deleted by a script called by
>>> >dpkg-reconfigure, maybe, netman-gui.postinst?
>>  2) db_get netman-gui/netman-autostart
>>  if [ "$RET" = "true" ]; then
>>  file="/etc/xdg/autostart/netman.desktop";
>>  mv/usr/share/applications/netman.desktop
>> /etc/xdg/autostart/
>>  fi
>>  ;;
>>
>> This moves the /usr/share/applications/netman.desktop file to
>> /etc/xdg/autostart, consequently, /usr/share/applications/netman.desktop
>> doesn't exist anymore afterwards. And it doesn't do anything in order to
>> disable autostartf if $RET is not true. If the /etc/xdg/autostart file
>> is not supposed to be modified, I suggest creating a symlink instead, ie
>>
>> ln -s/usr/share/applications/netman.desktop /etc/xdg/autostart/
>>
>> You could also use cp instead of mv so that the autostart file will be a
>> copy of the original.
>
>
> Sorry, today i had a family meal. Yes, this is what is causing the
> "problem": if the user prefers to autostart netman automaticaly, the
> script removes the launcher from xfce-applications.menu,
> lxde-applications.menu, etc... But i can change "mv" by "cp" if you
> prefer so.
>
> Cheers,
>
> Aitor.
>
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] netman-gtk3: invalid pointer error

2016-01-06 Thread aitor_czr

Hi,

I can't free the memory of some pointers ( *cad2 and *res) in 
netman-gtk3. This is what i get:


~$ gcc main.c -o main

~$ ./main
*** Error in `./main': munmap_chunk(): invalid pointer: 
0x01bfdab4 ***

Aborted

See the comented lines 119 and 120 in the attached file.

The textual output of this applications shows the caracteristics of the 
available active wifis.


Any hints?

   Aitor.

Note: you need to install the backend of netman.
#include 
#include 
#include 

int N;
int scan_dim();
void scan_buffer (char **ptr, char *command, char *name, char *str1, char *str2);

int main(int argc, char **argv)
{
  int i;
  char **_essid, **_address, **_quality;
	
  N=scan_dim();
  
  _essid = (char**)malloc(N*sizeof(char*));
  if(!_essid) {printf("Fallo de asignación de memoria\n"); exit(-1);}
	
  _address = (char**)malloc(N*sizeof(char*));
  if(!_address) {printf("Fallo de asignación de memoria\n"); exit(-1);}

  _quality = (char**)malloc(N*sizeof(char*));
  if(!_quality) {printf("Fallo de asignación de memoria\n"); exit(-1);}
  
  scan_buffer (_essid,   "/usr/lib/netman/bin/backend 8", "ESSID:", "\"", "\"");
  scan_buffer (_quality, "/usr/lib/netman/bin/backend 8", "Quality=", "=" , "Signal level");
  scan_buffer (_address, "/usr/lib/netman/bin/backend 8", "Address:", " " , "\"");

  for(i=0; i___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-gtk3: invalid pointer error

2016-01-06 Thread aitor_czr

On 01/06/2016 07:59 PM, Edward Bartolo  wrote:

Hi,

I can't free the memory of some pointers ( *cad2 and *res) in
netman-gtk3. This is what i get:

~$ gcc main.c -o main

~$ ./main
*** Error in `./main': munmap_chunk(): invalid pointer:
0x01bfdab4 ***
Aborted

See the comented lines 119 and 120 in the attached file.

The textual output of this applications shows the caracteristics of the
available active wifis.

Any hints?

 Aitor.

Note: you need to install the backend of netman.


This is the code:

#include 
#include 
#include 

int N;
int scan_dim();
void scan_buffer (char **ptr, char *command, char *name, char *str1, 
char *str2);


int main(int argc, char **argv)
{
  int i;
  char **_essid, **_address, **_quality;

  N=scan_dim();

  _essid = (char**)malloc(N*sizeof(char*));
  if(!_essid) {printf("Fallo de asignación de memoria\n"); exit(-1);}

  _address = (char**)malloc(N*sizeof(char*));
  if(!_address) {printf("Fallo de asignación de memoria\n"); exit(-1);}

  _quality = (char**)malloc(N*sizeof(char*));
  if(!_quality) {printf("Fallo de asignación de memoria\n"); exit(-1);}

  scan_buffer (_essid,   "/usr/lib/netman/bin/backend 8", "ESSID:", 
"\"", "\"");
  scan_buffer (_quality, "/usr/lib/netman/bin/backend 8", "Quality=", 
"=" , "Signal level");
  scan_buffer (_address, "/usr/lib/netman/bin/backend 8", "Address:", " 
" , "\"");


  for(i=0; ivoid scan_buffer (char **ptr, char *command, char *name, char *str1, 
char *str2)

{
  FILE *fp;
  char *cad1, *cad2, *res;

  cad1=(char*)malloc(1024*sizeof(char));
  if(!cad1) {printf("Fallo de asignación de memoria\n"); exit(-1);}

  cad2=(char*)malloc(1024*sizeof(char));
  if(!cad2) {printf("Fallo de asignación de memoria\n"); exit(-1);}

  res=(char*)malloc(1024*sizeof(char));
  if(!res) {printf("Fallo de asignación de memoria\n"); exit(-1);}

  fp = fopen("output", "r");
  if(!fp) exit(-1);

  int cont=0;
  while (fgets(cad1, 1024, fp))
  {
if(strstr((char *) cad1, name))
   {
 cad2 = strstr((char *) cad1, name);
 res  = strstr((char *) cad2, str1);

 if(name!="Address:")
 {
  int bool=0;
  int i=0;
  int n,m;
  while ((bool!=1) && (res[i]!='\0'))
{
 if(str2[0]==res[i])
{
  m=i; n=0;
while ((bool!=1) && (str1[n]==res[m]))
{
  n++; m++;
  if (n == strlen(res)) bool=1;
}
}
 i++;
}

  for (i=(m-n); res[i]!='\0';i++) res[i]='\0';
 }
 else res[18]='\0';

 int j=0;
 while(j if(!ptr[cont]) {printf("Fallo de asignación de memoria\n"); 
exit(-1);}


 strcpy(ptr[cont], res);
 ptr[cont][strlen(res)]='\0';
 cont++;
   }
  }

  free(cad1);
  // free(cad2);
  // free(res);
  fclose(fp);
  return;
}

int scan_dim ()
{
  FILE *fp, *fp1;
  char *cad1, *cad2;

  cad1=(char*)malloc(1024*sizeof(char));
  if(!cad1) {printf("Fallo de asignación de memoria\n"); exit(-1);}

  cad2=(char*)malloc(1024*sizeof(char));
  if(!cad2) {printf("Fallo de asignación de memoria\n"); exit(-1);}

  fp = popen("/usr/lib/netman/bin/backend 8", "r");
  if(!fp) exit(-1);

  fp1 = fopen("output", "w");
  if(!fp1) exit(-1);

  int cont=0;
  while (fgets(cad1, 1024, fp))
  {
if(strstr((char *) cad1, "Address:"))
   {
  cad2 = strstr((char *) cad1, "Address:");
  fprintf(fp1, "%s", cad2);
 cont++;
   }
else if(strstr((char *) cad1, " "))
{
  cad2 = strstr((char *) cad1, " ");
  fprintf(fp1, "%s", cad2);
}
  }

  pclose(fp);
  fclose(fp1);
  return cont;
}
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-autostart_0.1.1

2016-01-06 Thread Rainer Weikusat
Edward Bartolo  writes:
> Enjoy yourself, I am working on it. I think, I got a way of putting it
> right. There are two .desktop files that control how netman gui
> behaves:
> a) /etc/xdg/autostart/netman.desktop
> b) /usr/share/applications/netman.desktop
>
> The netman-gui.postinst script has to modify both of them.

In this case, you shouldn't copy the file but create a symlink to
it. This means there's only one copy which has to be modified.

[...]

> The sed command in the postinst script also has to
> make sure no multiple Exec= and Comment= lines are added to both
> .desktop files.

sed is generally the wrong choice for editing files (as it's the 'stream
editor'). ed can be used for that (needs to become a package dependency
as 'certain people in the Debian project' were hit by a pine at a
formative age and are thus opposed to using sensibly-working text
editors).

The following shell function should be sufficient for your use-case

---
change_line()
{
file="$1"
new="`echo $2 | sed 's/\(.\)/\1/g'`"
key=`expr "$2" : "\([^=]\+=\)."`
ed "$file" 

Re: [DNG] netman-gtk3: invalid pointer error

2016-01-06 Thread Irrwahn
On Wed, 06 Jan 2016 20:05:12 +0100, Aitor Czr wrote:
> On 01/06/2016 07:59 PM, Edward Bartolo  wrote:
>> Hi,
>>
>> I can't free the memory of some pointers ( *cad2 and *res) in 
>> netman-gtk3. This is what i get:
>>
>> ~$ gcc main.c -o main
>>
>> ~$ ./main
>> *** Error in `./main': munmap_chunk(): invalid pointer: 
>> 0x01bfdab4 ***
>> Aborted

[...]

Note: I didn't try to undertand what the code is intended
to do, just commenting on some obvious flaws.

> void scan_buffer (char **ptr, char *command, char *name, char *str1, char 
> *str2)
> {
>   FILE *fp;
>   char *cad1, *cad2, *res;
>  
>   cad1=(char*)malloc(1024*sizeof(char));

Better C style would've been:

cad1=malloc(1024);

Casting malloc()'s return value is nonsense and potentially dangerous, 
sizeof(char) is always guaranteed to equal 1.

[...]

>  cad2 = strstr((char *) cad1, name); 
>  res  = strstr((char *) cad2, str1);


Now you assigned to cad2 and res and lost your only reference 
to your meticulously allocated buffers! (More bogus casts, BTW.)

[...]

And then you tried to free something that was not a pointer value 
returned by any of the *alloc() functions:

>   // free(cad2);
>   // free(res);

[...]

As I said, I didn't try to guess the intention - if you want to 
work in-place an the string or if you're actually looking for strcpy().

HTH, regards
Irrwahn

 
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] PAM usage (Was: Giving Devuan sans-initramfs capabilities)

2016-01-06 Thread Aldemir Akpinar
On 6 January 2016 at 20:29, Didier Kryn  wrote:

> Le 06/01/2016 17:13, Teodoro Santoni a écrit :
>
>> PAM is a problem, the cups behaviour is another.
>> My problem is to run things as, for example, my cheap
>> hp printer without systemd.
>> Next may come hplip through lprng or lpr.
>> I talk about my printer but dunno, may run wayland someday, or
>> have my family scavenge for money spending on e-commerce
>> through google-chrome.
>> I personally don't use any of those, but without pam, a life
>> without systemd seem much easier.
>> Maybe I'm wrong.
>>
>
> I'm having pam installed on my devuan-jessie-alpha2 and no systemd and
> no libpam-systemd. No problem.
>
> Didier
>
>
Yes, even on a Debian Jessie  I've PAM installed without systemd. And I
fail to see what the big deal about PAM is in this case.
--
aldemir,
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] netman-autostart_0.1.1

2016-01-06 Thread Edward Bartolo
Hi Rainer, Aitor and All,

netman-gui.postinst now is debugged to behave properly when
dpkg-reconfigure is used on netman-gui.

sed is still adding an unneccessary leading space in lines Exec=  and
Comment= in both .desktop files.

I was suggested to drop one of the .desktop files and use a symlink
instead. I think this is a good idea, but I have been coding for 10
hours 30 minutes now, so it is time for me to go to sleep.

Edward

On 06/01/2016, Rainer Weikusat  wrote:
> Edward Bartolo  writes:
>> Enjoy yourself, I am working on it. I think, I got a way of putting it
>> right. There are two .desktop files that control how netman gui
>> behaves:
>> a) /etc/xdg/autostart/netman.desktop
>> b) /usr/share/applications/netman.desktop
>>
>> The netman-gui.postinst script has to modify both of them.
>
> In this case, you shouldn't copy the file but create a symlink to
> it. This means there's only one copy which has to be modified.
>
> [...]
>
>> The sed command in the postinst script also has to
>> make sure no multiple Exec= and Comment= lines are added to both
>> .desktop files.
>
> sed is generally the wrong choice for editing files (as it's the 'stream
> editor'). ed can be used for that (needs to become a package dependency
> as 'certain people in the Debian project' were hit by a pine at a
> formative age and are thus opposed to using sensibly-working text
> editors).
>
> The following shell function should be sufficient for your use-case
>
> ---
> change_line()
> {
> file="$1"
> new="`echo $2 | sed 's/\(.\)/\1/g'`"
> key=`expr "$2" : "\([^=]\+=\)."`
> ed "$file" < /^$key/s/.*/$new
> wq
> EOF
> }
> ---
>
> This takes a file as first argument and the new line as second
> argument. If a line with the same 'keyword' (text before the first =)
> already exists, it's replaced. Otherwise, nothing happens.
>
> NB: Like all shell code (or most), this won't work with 'suitably
> crafted input'. But shell programming is an exercise in inventing 'good
> enough' solutions for fairly well-defined problems.
> ___
> Dng mailing list
> Dng@lists.dyne.org
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng