Re: Kernel relink and disable ulpt in kernel - cups printing

2020-03-28 Thread Mikolaj Kucharski
On Sat, Mar 28, 2020 at 12:05:26PM +0100, Antoine Jacoutot wrote:
> > I went for adding:
> > 
> > printf 'disable ulpt\nq\n' | config -ef /bsd && \
> > sha256 -h /var/db/kernel.SHA256 /bsd
> > 
> > to /etc/rc.shutdown and /upgrade.site and that makes it work the way I
> > would like to.
> > 
> > Would that be worth adding to ports/print/cups/pkg/README-main?
> 
> No.
> That's very bad practice.

Oh. Which part is exactly bad practice?

Do you mean adding commands to /upgrade.site or to /etc/rc.shutdown or
both, or in general using config -ef /bsd to disable drivers?

Is there any info which can be added to cups/pkg/README-main to make the
process more automated for disabling ulpt in kernel which plays nice
with sysupgrade or syspatch?

-- 
Regards,
 Mikolaj



Re: Kernel relink and disable ulpt in kernel - cups printing

2020-03-28 Thread Antoine Jacoutot
On Sat, Mar 28, 2020 at 10:39:56AM +, Mikolaj Kucharski wrote:
> On Wed, Mar 25, 2020 at 02:23:48PM +, Mikolaj Kucharski wrote:
> > It has one disadvantage. It doesn't integrate well with sysupgrade(8)
> > and need one additional reboot, to get desired kernel configuration. For
> > me it's easy to forget this one additional reboot.
> 
> I went for adding:
> 
>   printf 'disable ulpt\nq\n' | config -ef /bsd && \
>   sha256 -h /var/db/kernel.SHA256 /bsd
> 
> to /etc/rc.shutdown and /upgrade.site and that makes it work the way I
> would like to.
> 
> Would that be worth adding to ports/print/cups/pkg/README-main?

No.
That's very bad practice.

-- 
Antoine



Re: Kernel relink and disable ulpt in kernel - cups printing

2020-03-28 Thread Mikolaj Kucharski
On Wed, Mar 25, 2020 at 02:23:48PM +, Mikolaj Kucharski wrote:
> It has one disadvantage. It doesn't integrate well with sysupgrade(8)
> and need one additional reboot, to get desired kernel configuration. For
> me it's easy to forget this one additional reboot.

I went for adding:

printf 'disable ulpt\nq\n' | config -ef /bsd && \
sha256 -h /var/db/kernel.SHA256 /bsd

to /etc/rc.shutdown and /upgrade.site and that makes it work the way I
would like to.

Would that be worth adding to ports/print/cups/pkg/README-main?

-- 
Regards,
 Mikolaj



Re: Kernel relink and disable ulpt in kernel - cups printing

2020-03-25 Thread Chris Bennett
On Wed, Mar 25, 2020 at 02:23:48PM +, Mikolaj Kucharski wrote:
> On Sat, Mar 21, 2020 at 08:04:35PM +, Mikolaj Kucharski wrote:
> > On Thu, Mar 19, 2020 at 08:08:10AM +0100, Antoine Jacoutot wrote:
> > > > - How do you handle kernel modifications via config(8) with kernel
> > > >   relinking in a more automated way?
> > > 
> > > $ cat /etc/rc.shutdown 
> > > printf 'disable ulpt\nq\n' | config -ef /bsd
> > > sha256 /bsd >/var/db/kernel.SHA256
> > 
> > Neat, simple and straightforward. I like it, thanks Antoine.
> 
> It has one disadvantage. It doesn't integrate well with sysupgrade(8)
> and need one additional reboot, to get desired kernel configuration. For
> me it's easy to forget this one additional reboot.
> 

Actually, not.
When rebooting the first time, use boot -c
Then disable ulpt
quit 

Which is what the above does for later reboots.
Which I am now thrilled to use for disable amdgpu.
I can now skip using boot -c

Boot -c is often used to enable or disable things to allow successful
booting at all.

-- 
Chris Bennett




Re: Kernel relink and disable ulpt in kernel - cups printing

2020-03-25 Thread Mikolaj Kucharski
On Sat, Mar 21, 2020 at 08:04:35PM +, Mikolaj Kucharski wrote:
> On Thu, Mar 19, 2020 at 08:08:10AM +0100, Antoine Jacoutot wrote:
> > > - How do you handle kernel modifications via config(8) with kernel
> > >   relinking in a more automated way?
> > 
> > $ cat /etc/rc.shutdown 
> > printf 'disable ulpt\nq\n' | config -ef /bsd
> > sha256 /bsd >/var/db/kernel.SHA256
> 
> Neat, simple and straightforward. I like it, thanks Antoine.

It has one disadvantage. It doesn't integrate well with sysupgrade(8)
and need one additional reboot, to get desired kernel configuration. For
me it's easy to forget this one additional reboot.

-- 
Regards,
 Mikolaj



Re: Kernel relink and disable ulpt in kernel - cups printing

2020-03-22 Thread François Chambaud
Mikolaj Kucharski  writes:

> Hi,
>
> On Thu, Mar 19, 2020 at 08:08:10AM +0100, Antoine Jacoutot wrote:
>> > - How do you handle kernel modifications via config(8) with kernel
>> >   relinking in a more automated way?
>> 
>> $ cat /etc/rc.shutdown 
>> printf 'disable ulpt\nq\n' | config -ef /bsd
>> sha256 /bsd >/var/db/kernel.SHA256
>
> Neat, simple and straightforward. I like it, thanks Antoine.

Or with -h option:

 -h hashfile
 Place the checksum into hashfile instead of stdout.

sha256 -h /var/db/kernel.SHA256 /bsd

-- 
François Chambaud
www.chambaud.org



Re: Kernel relink and disable ulpt in kernel - cups printing

2020-03-21 Thread Mikolaj Kucharski
Hi,

On Thu, Mar 19, 2020 at 08:08:10AM +0100, Antoine Jacoutot wrote:
> > - How do you handle kernel modifications via config(8) with kernel
> >   relinking in a more automated way?
> 
> $ cat /etc/rc.shutdown 
> printf 'disable ulpt\nq\n' | config -ef /bsd
> sha256 /bsd >/var/db/kernel.SHA256

Neat, simple and straightforward. I like it, thanks Antoine.

-- 
Regards,
 Mikolaj



Re: Kernel relink and disable ulpt in kernel - cups printing

2020-03-19 Thread Antoine Jacoutot
> - How do you handle kernel modifications via config(8) with kernel
>   relinking in a more automated way?

$ cat /etc/rc.shutdown 
printf 'disable ulpt\nq\n' | config -ef /bsd
sha256 /bsd >/var/db/kernel.SHA256

-- 
Antoine



Re: Kernel relink and disable ulpt in kernel - cups printing

2020-03-17 Thread Anthony J. Bentley
Mikolaj Kucharski writes:
> - Does any of you have a working printer using ulpt(4) driver under
>   OpenBSD?

Yes, I just bought my first printer, a Brother DCP-L2550DW, and it works
fine with ulpt(4) and lpd(8). It needed one customization: my printcap
calls an output filter that (for non-PDF/PostScript) inserts a blank
line in front and adds carriage returns to all lines. I can print plain
text, PostScript, or PDF simply by passing the file to lpr(1).



Re: Kernel relink and disable ulpt in kernel - cups printing

2020-03-17 Thread Mikolaj Kucharski
On Tue, Mar 17, 2020 at 08:13:14AM +, Mikolaj Kucharski wrote:
> Please carbon-copy me in any replies. Thank you.

So it was ment for misc and not ports, but I'll leave it on ports for
now.

-- 
Regards,
 Mikolaj